pest-plugin-drift
pest-plugin-drift copied to clipboard
@testWith annotations not converted
PHPUnit supports @testWith annotations which is the same as providing a with() dataset to a Pest test:
PHPUnit Input:
class SomeTest extends TestCase
{
/**
* @testWith
* ["1"]
* [1]
* [true]
*/
public function testIsTruthy($value)
{
$this->assertTrue((bool) $value);
}
}
Expected Output:
test('is truthy', function ($value) {
expect($value)->toBeTrue();
})->with([
"1",
1,
true,
]);
Actual Output:
test('is truthy', function ($value) {
expect($value)->toBeTrue();
});