Skip to content

Commit

Permalink
Closes #5288
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 21, 2023
1 parent bbbb3b0 commit 6c5fb82
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog-10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes of the PHPUnit 10.0 release series are documented in this fi
### Fixed

* [#5287](https://github.com/sebastianbergmann/phpunit/issues/5287): Tests from test class with same non-fully qualified class name as another test class are sometimes not discovered
* [#5288](https://github.com/sebastianbergmann/phpunit/issues/5288): `@dataProvider` annotation rejects previously valid method name style

## [10.0.17] - 2023-03-20

Expand Down
9 changes: 9 additions & 0 deletions src/Metadata/Parser/AnnotationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use function method_exists;
use function preg_replace;
use function str_contains;
use function str_replace;
use function str_starts_with;
use function strlen;
use function substr;
Expand Down Expand Up @@ -217,6 +218,14 @@ public function forMethod(string $className, string $methodName): MetadataCollec

case 'dataProvider':
foreach ($values as $value) {
$value = trim(
str_replace(
['(', ')'],
'',
$value
)
);

if (str_contains($value, '::')) {
$result[] = Metadata::dataProvider(...explode('::', $value));

Expand Down

0 comments on commit 6c5fb82

Please sign in to comment.