Skip to content
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

Merged
merged 2 commits into from
Oct 22, 2016

Conversation

alnorth
Copy link
Contributor

@alnorth alnorth commented Jun 14, 2016

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.

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.
Copy link
Member

@renatomefi renatomefi left a 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);
Copy link
Member

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)
Copy link
Member

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?

@alnorth
Copy link
Contributor Author

alnorth commented Oct 21, 2016

Great. I've made the boolean lowercase and added another entry to the dataProvider's array. All seems to be well.

@renatomefi
Copy link
Member

It looks good. Thanks @alnorth!
Have a nice weekend!

@renatomefi renatomefi merged commit ff86f7f into php-vcr:master Oct 22, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants