mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Update JunitXmlLogger.php
https://github.com/sebastianbergmann/phpunit/issues/6098
This commit is contained in:
@ -27,6 +27,7 @@ use PHPUnit\Event\Test\Finished;
|
|||||||
use PHPUnit\Event\Test\MarkedIncomplete;
|
use PHPUnit\Event\Test\MarkedIncomplete;
|
||||||
use PHPUnit\Event\Test\PreparationStarted;
|
use PHPUnit\Event\Test\PreparationStarted;
|
||||||
use PHPUnit\Event\Test\Prepared;
|
use PHPUnit\Event\Test\Prepared;
|
||||||
|
use PHPUnit\Event\Test\PrintedUnexpectedOutput;
|
||||||
use PHPUnit\Event\Test\Skipped;
|
use PHPUnit\Event\Test\Skipped;
|
||||||
use PHPUnit\Event\TestSuite\Started;
|
use PHPUnit\Event\TestSuite\Started;
|
||||||
use PHPUnit\Event\UnknownSubscriberTypeException;
|
use PHPUnit\Event\UnknownSubscriberTypeException;
|
||||||
@ -207,6 +208,18 @@ final class JunitXmlLogger
|
|||||||
$this->prepared = true;
|
$this->prepared = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testPrintedUnexpectedOutput(PrintedUnexpectedOutput $event): void
|
||||||
|
{
|
||||||
|
assert($this->currentTestCase !== null);
|
||||||
|
|
||||||
|
$systemOut = $this->document->createElement(
|
||||||
|
'system-out',
|
||||||
|
Xml::prepareString($event->output()),
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->currentTestCase->appendChild($systemOut);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
@ -301,6 +314,7 @@ final class JunitXmlLogger
|
|||||||
new TestPreparationStartedSubscriber($this),
|
new TestPreparationStartedSubscriber($this),
|
||||||
new TestPreparationFailedSubscriber($this),
|
new TestPreparationFailedSubscriber($this),
|
||||||
new TestPreparedSubscriber($this),
|
new TestPreparedSubscriber($this),
|
||||||
|
new TestPrintedUnexpectedOutputSubscriber($this),
|
||||||
new TestFinishedSubscriber($this),
|
new TestFinishedSubscriber($this),
|
||||||
new TestErroredSubscriber($this),
|
new TestErroredSubscriber($this),
|
||||||
new TestFailedSubscriber($this),
|
new TestFailedSubscriber($this),
|
||||||
|
|||||||
Reference in New Issue
Block a user