-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Skipping a test in a before-class method crashes JUnit XML logger #6109
Comments
I cannot reproduce this:
|
Apologies for incomplete example. Looks like somewhere along the way there is an unexpected output created in my app test suite which causes the issue. I will get that checked but in the meantime, I created following reproducer test which demonstrates the issue correctly: namespace PHPUnit\TestFixture\Issue6109;
use PHPUnit\Framework\TestCase;
final class Issue6109Test extends TestCase
{
protected function setUp(): void
{
parent::setUp();
print '*';
$this->markTestSkipped('This test is failing when running with JUnit Logger');
}
public function testOne(): void
{
$this->assertTrue(true);
}
}
|
Thank you, I will look into this as soon as I can. |
Summary
Test marked as skipped throws exception when using
--log-junit
since v11.5.3.Current behavior
Some of my tests are marked as skipped using
$this->markTestSkipped('This test is still broken');
. When running PHPUnit with--log-junit
, it throws an exception due to changes made in d099069 (fixing #6098)How to reproduce
Create a test with following body:
Executing the test causes following error:
Expected behavior
No error should be thrown.
The text was updated successfully, but these errors were encountered: