1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
--TEST--
phpunit --log-otr /path/to/logfile ../../event/_files/SkippedInSetupTest.php
--FILE--
<?php declare(strict_types=1);
use function PHPUnit\TestFixture\validate_and_print;
$logfile = tempnam(sys_get_temp_dir(), __FILE__);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--no-output';
$_SERVER['argv'][] = '--log-otr';
$_SERVER['argv'][] = $logfile;
$_SERVER['argv'][] = __DIR__ . '/../../event/_files/SkippedInSetupTest.php';
require __DIR__ . '/../../../bootstrap.php';
require __DIR__ . '/validate_and_print.php';
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
validate_and_print($logfile);
unlink($logfile);
--EXPECTF--
<?xml version="1.0"?>
<e:events xmlns="https://schemas.opentest4j.org/reporting/core/0.2.0" xmlns:e="https://schemas.opentest4j.org/reporting/events/0.2.0" xmlns:php="https://schema.phpunit.de/otr/php/0.0.1" xmlns:phpunit="https://schema.phpunit.de/otr/phpunit/0.0.1">
<infrastructure>
<hostName>%s</hostName>
<userName>%s</userName>
<operatingSystem>%s</operatingSystem>
<php:phpVersion>%s</php:phpVersion>
<php:threadModel>%s</php:threadModel>
</infrastructure>
<e:started id="1" name="PHPUnit\TestFixture\Event\SkippedInSetupTest" time="%s">
<sources>
<fileSource path="%sSkippedInSetupTest.php">
<filePosition line="%d"/>
</fileSource>
<phpunit:classSource className="PHPUnit\TestFixture\Event\SkippedInSetupTest"/>
</sources>
</e:started>
<e:started id="2" parentId="1" name="testOne" time="%s">
<sources>
<fileSource path="%sSkippedInSetupTest.php">
<filePosition line="%d"/>
</fileSource>
<phpunit:methodSource className="PHPUnit\TestFixture\Event\SkippedInSetupTest" methodName="testOne"/>
</sources>
</e:started>
<e:finished id="2" time="%s">
<result status="SKIPPED">
<reason></reason>
</result>
</e:finished>
<e:finished id="1" time="%s"/>
</e:events>
|