-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip variadic on AddParamTypeBasedOnPHPUnitDataProv…
…iderRector (#6150) * [TypeDeclaration] Skip variadic on AddParamTypeBasedOnPHPUnitDataProviderRector * [TypeDeclaration] Skip variadic on AddParamTypeBasedOnPHPUnitDataProviderRector
- Loading branch information
1 parent
07a3bdc
commit d6de24c
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...or/ClassMethod/AddParamTypeBasedOnPHPUnitDataProviderRector/Fixture/skip_variadic.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,21 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamTypeBasedOnPHPUnitDataProviderRector\Fixture; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
final class SkipVariadic extends TestCase | ||
{ | ||
/** | ||
* @dataProvider dataDummy | ||
*/ | ||
public function testDummy(...$args): void { | ||
self::assertIsArray($args); | ||
} | ||
|
||
public function dataDummy(): array { | ||
return [ | ||
'case'=> [4, 'arg'] // <-- int + string | ||
]; | ||
} | ||
} |
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