Last active
December 27, 2022 17:30
This file contains hidden or 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