-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ensure annotations work on tests that use dataProviders #12
Conversation
By default $test->getName() appends the name of the data set (e.g. testInterceptsWithAnnotationsWhenUsingDataProvider with data set #0). This means that the reflection to get the doc block doesn't work.
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.
Thank you very much for this, I'm looking forward to merge it, do you mind taking a look into the considerations?
@@ -122,7 +122,7 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) | |||
public function startTest(PHPUnit_Framework_Test $test) | |||
{ | |||
$class = get_class($test); | |||
$method = $test->getName(); | |||
$method = $test->getName(FALSE); |
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.
Can you put this false in lower case?
public function aDataProvider() | ||
{ | ||
return array( | ||
array(null) |
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.
maybe you can put another item, this way we can make sure multiple iterations are happening. What do you think?
Great. I've made the boolean lowercase and added another entry to the dataProvider's array. All seems to be well. |
It looks good. Thanks @alnorth! |
By default
$test->getName()
appends the name of the data set (e.g. "testInterceptsWithAnnotationsWhenUsingDataProvider with data set #0"). This means that the reflection to get the doc block doesn't work.