-
-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AddParamTypeBasedOnPHPUnitDataProviderRector: Check all data providers (
- Loading branch information
Showing
3 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
...ssMethod/AddParamTypeBasedOnPHPUnitDataProviderRector/Fixture/check_all_providers.php.inc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamTypeBasedOnPHPUnitDataProviderRector\Fixture; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class MultipleProviders extends TestCase | ||
{ | ||
public function dataProvider1(): iterable { | ||
yield [1]; | ||
yield [null]; | ||
} | ||
|
||
public function dataProvider2(): iterable { | ||
yield ['foo']; | ||
} | ||
|
||
/** | ||
* @dataProvider dataProvider1 | ||
* @dataProvider dataProvider2 | ||
*/ | ||
public function testGetFromId($data): void { | ||
} | ||
} | ||
|
||
?> |
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