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
Cannot mark tests as skipped or incomplete in beforeClass
hooks
#4689
Comments
Thank you for your report. Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting. Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue. |
Please find here a reproducer: https://github.com/jderusse/phpunit-4689
output
|
beforeClass
hooksbeforeClass
hooks
FYI on Symfony, we merged symfony/symfony#41384 meanwhile. |
Superseded by #5164 |
Summary
When calling
self::markTestSkipped
in asetUpBeforeClass
method, all tests inside the file are flaggedSkipped
without the error "Test skipped because of an error in hook method"When looking at https://github.com/sebastianbergmann/phpunit/blob/master/src/Framework/TestSuite.php#L438-L448
It looks like we can fix this by throwing a
SkippedTestSuiteError
instead. But this class is@internal
.Current behavior
How to reproduce
Expected behavior
Suggestion
Add a public static
markTestSuiteSkipped
method to the APIThe text was updated successfully, but these errors were encountered: