mirror of
https://github.com/pestphp/pest.git
synced 2026-03-13 03:07:22 +01:00
Fixes the assertion output showing as 0 in the TeamCity logger.
This commit is contained in:
@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest\Logging;
|
namespace Pest\Logging;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PHPUnit\Runner\PhptTestCase;
|
||||||
use function getmypid;
|
use function getmypid;
|
||||||
use Pest\Concerns\Testable;
|
use Pest\Concerns\Testable;
|
||||||
use PHPUnit\Framework\AssertionFailedError;
|
use PHPUnit\Framework\AssertionFailedError;
|
||||||
@ -137,6 +139,12 @@ final class TeamCity extends DefaultResultPrinter
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($test instanceof TestCase) {
|
||||||
|
$this->numAssertions += $test->getNumAssertions();
|
||||||
|
} elseif ($test instanceof PhptTestCase) {
|
||||||
|
$this->numAssertions++;
|
||||||
|
}
|
||||||
|
|
||||||
$this->printEvent('testFinished', [
|
$this->printEvent('testFinished', [
|
||||||
self::NAME => $test->getName(),
|
self::NAME => $test->getName(),
|
||||||
self::DURATION => self::toMilliseconds($time),
|
self::DURATION => self::toMilliseconds($time),
|
||||||
|
|||||||
Reference in New Issue
Block a user