�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Runner; use function preg_match; use function round; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ResultCacheExtension implements AfterIncompleteTestHook, AfterLastTestHook, AfterRiskyTestHook, AfterSkippedTestHook, AfterSuccessfulTestHook, AfterTestErrorHook, AfterTestFailureHook, AfterTestWarningHook { /** * @var TestResultCache */ private $cache; public function __construct(TestResultCache $cache) { $this->cache = $cache; } public function flush(): void { $this->cache->persist(); } public function executeAfterSuccessfulTest(string $test, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); } public function executeAfterIncompleteTest(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_INCOMPLETE); } public function executeAfterRiskyTest(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_RISKY); } public function executeAfterSkippedTest(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_SKIPPED); } public function executeAfterTestError(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_ERROR); } public function executeAfterTestFailure(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_FAILURE); } public function executeAfterTestWarning(string $test, string $message, float $time): void { $testName = $this->getTestName($test); $this->cache->setTime($testName, round($time, 3)); $this->cache->setState($testName, BaseTestRunner::STATUS_WARNING); } public function executeAfterLastTest(): void { $this->flush(); } /** * @param string $test A long description format of the current test * * @return string The test name without TestSuiteClassName:: and @dataprovider details */ private function getTestName(string $test): string { $matches = []; if (preg_match('/^(?\S+::\S+)(?:(? with data set (?:#\d+|"[^"]+"))\s\()?/', $test, $matches)) { $test = $matches['name'] . ($matches['dataname'] ?? ''); } return $test; } }