This commit is contained in:
Adrian Nürnberger
2025-01-20 09:34:55 +01:00
parent 7760d945bb
commit 8ee9d66d80

View File

@ -41,6 +41,8 @@ use function str_replace;
use function trim;
/**
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
*
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class JunitXmlLogger
@ -59,32 +61,32 @@ final class JunitXmlLogger
private array $testSuites = [];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteTests = [0];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteAssertions = [0];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteErrors = [0];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteFailures = [0];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteSkipped = [0];
/**
* @psalm-var array<int,int>
* @var array<int,int>
*/
private array $testSuiteTimes = [0];
@ -195,17 +197,11 @@ final class JunitXmlLogger
$this->createTestCase($event);
}
/**
* @throws InvalidArgumentException
*/
public function testPreparationFailed(): void
{
$this->preparationFailed = true;
}
/**
* @throws InvalidArgumentException
*/
public function testPrepared(): void
{
$this->prepared = true;
@ -431,7 +427,7 @@ final class JunitXmlLogger
/**
* @throws InvalidArgumentException
*
* @psalm-assert !null $this->currentTestCase
* @phpstan-assert !null $this->currentTestCase
*/
private function createTestCase(Errored|Failed|MarkedIncomplete|PreparationStarted|Prepared|Skipped $event): void
{