Last active
December 27, 2022 17:30
-
-
Save a3dho3yn/c817d69429d2b56a84843d297f43e51e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature; | |
use Tests\TestCase; | |
class DataProviderTest extends TestCase | |
{ | |
/** | |
* @dataProvider additionProvider | |
*/ | |
public function testAdd($a, $b, $expected) | |
{ | |
$this->assertSame($expected, $a + $b); | |
} | |
public function additionProvider() | |
{ | |
return [ | |
[0, 0, 0], | |
[0, 1, 1], | |
[1, 0, 1], | |
[1, 1, 3] | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment