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

Use methodName() to eliminate method not found warnings #3

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

ivancli
Copy link

@ivancli ivancli commented Aug 1, 2024

From PHPUnit 10.4.0, PHPUnit throws exceptions from third-party subscribers.
sebastianbergmann/phpunit@6ce7c0b

When a test method uses Data Provider, the $this->name() in \VCR\PHPUnit\TestListener\Subscribers\OnTestPrepared::getCassette() returns method name + "with data set #0" resulting in the warning below.

  1. Exception in third-party event subscriber: Method Tests\VCR\PHPUnit\TestListener\VCRTestListenerTest::testInterceptsWithAnnotationsWhenUsingDataProvider with data set #0() does not exist

This PR is to pull the method name from \PHPUnit\Event\Code\TestMethod::methodName().

@specialtactics specialtactics merged commit 3b446d5 into CoverGenius:master Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants