Skip to content

Instantly share code, notes, and snippets.

@a3dho3yn
Last active December 27, 2022 17:30
Show Gist options
  • Save a3dho3yn/c817d69429d2b56a84843d297f43e51e to your computer and use it in GitHub Desktop.
Save a3dho3yn/c817d69429d2b56a84843d297f43e51e to your computer and use it in GitHub Desktop.
<?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