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

failOnWarning="true" but tests with warnings marked as passed in PHPStorm #4711

Open
doctorby opened this issue Jun 15, 2021 · 0 comments
Open
Labels
feature/teamcity The TeamCity logger type/bug Something is broken

Comments

@doctorby
Copy link

doctorby commented Jun 15, 2021

Q A
PHPUnit version 8.5.16
PHP version 7.4.20
Installation Method Composer

Summary

Was introduced here #4623

Running tests from PHPSTORM, before PHPUnit 8.5.15, having failOnWarning="true", test with warnings was marked as failed, now it's marked as passed.

Current behavior

Tests with warnings marked as passed in PHPSTORM

image

How to reproduce

Create test.
Make mistake in dataprovider method or in setUp e.g. try to configure a method that does not exist in mocked class
Run test
Test marked as passed

Expected behavior

Having failOnWarning="true" -> tests with a warning should be marked as failed
image

I understand there were some reasons for #4623

But there must be some other solution.
Why is it important? With just one mistake in the seUp() method (e.g. ->method('not_existed_method') ), all tests inside the class will not be executed, but will be marked as "passed" - obviously this is not what is expected.

If I remove method from class, I expect that tests, where such method was configured, will fail

@doctorby doctorby added the type/bug Something is broken label Jun 15, 2021
@sebastianbergmann sebastianbergmann added the feature/teamcity The TeamCity logger label Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/teamcity The TeamCity logger type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants