New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed solution for #5457 gherkin scenarios not loaded from group file #5458
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,12 @@ public function groupsForTest(\PHPUnit\Framework\Test $test) | |
if (strpos($filename . ':' . $test->getName(false), $testPattern) === 0) { | ||
$groups[] = $group; | ||
} | ||
// TODO: consider mb_strtolower per https://stackoverflow.com/a/5473569 | ||
if (method_exists($test, 'getMetadata') | ||
&& strcasecmp($filename . ':' . $test->getMetadata()->getFeature(), $testPattern) === 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be UFT-8 compliant as put in your TODO There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since current solution is focused on Gherkin feature, before using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can do that. Are there any other types of tests that might benefit from this comparison though? |
||
) { | ||
$groups[] = $group; | ||
} | ||
if ($test instanceof \PHPUnit\Framework\TestSuite\DataProvider) { | ||
$firstTest = $test->testAt(0); | ||
if ($firstTest != false && $firstTest instanceof TestInterface) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a case where
metadata()
method does not exist ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some tests it did not so I added the check to make sure it was there before I called it