Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/Testing/PHPUnit/AbstractRectorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ protected function tearDown(): void
*/
protected function yieldFilesFromDirectory(string $directory, string $suffix = '*.php.inc'): Iterator
{
return StaticFixtureFinder::yieldDirectoryExclusively($directory, $suffix);
$counter = 0;
foreach (StaticFixtureFinder::yieldDirectoryExclusivelyWithRelativePathname($directory, $suffix) as $name => $parameters) {
yield '#' . $counter . ' ' . $name => $parameters;

++$counter;
}
Comment on lines +97 to +102
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems not working:

vendor/bin/phpunit rules-tests/TypeDeclaration/Rector/ClassMethod/AddArrayReturnDocTypeRector/AddArrayReturnDocTypeRectorTest.php --filter=#1
PHPUnit 9.5.20 #StandWithUkraine

No tests executed!

Copy link
Contributor Author

@alexander-schranz alexander-schranz May 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay that is really strange seems like some strange phpunit internal behaviour how # is handled in the filter.

Still thx for your time and feedback.

}

protected function isWindows(): bool
Expand Down