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

Coverage report section is not displayed after upgrading to PHPUnit 10 #263

Closed
leunggamciu opened this issue Mar 8, 2023 · 1 comment
Closed

Comments

@leunggamciu
Copy link

It seems that PHPUnit 10 treats empty test cases differently from PHPUnit 9.

use PHPUnit\Framework\TestCase;

class ExampleTestCase extends TestCase
{
}

In PHPUnit 9, the result would be

image

In PHPUnit 10

image

And because of the exit code check

if ($exitCode === 0 && $this->option('coverage')) {

If there is accidentally an empty test case in the test suite (in my case :)), and run php artisan test --coverage, the final test result appears to have passed, but the coverage report does not show up

image

I'm not sure if this is a bug, but it took me quite a few moments to figure out . I was thinking if it's possible to add a section showing the status of the test result.

@nunomaduro
Copy link
Owner

Not idea what's happening here. Sorry!

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

No branches or pull requests

2 participants