Skip to content

Commit

Permalink
Merge branch '11.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 6, 2024
2 parents 2aacfe2 + 7590889 commit 7047343
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5354
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--no-output';
$_SERVER['argv'][] = '--log-junit';
$_SERVER['argv'][] = 'php://stdout';
$_SERVER['argv'][] = __DIR__ . '/../_files/stop-on-fail-on/SkippedBeforeClassTest.php';

require_once __DIR__ . '/../../bootstrap.php';

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="PHPUnit\TestFixture\TestRunnerStopping\SkippedBeforeClassTest" file="%sSkippedBeforeClassTest.php"/>
</testsuites>
24 changes: 24 additions & 0 deletions tests/end-to-end/logging/log-junit-skipped-test-method.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--TEST--
JUnit XML: test skipped in test method
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = '--no-output';
$_SERVER['argv'][] = '--log-junit';
$_SERVER['argv'][] = 'php://stdout';
$_SERVER['argv'][] = __DIR__ . '/../_files/stop-on-fail-on/SkippedTest.php';

require_once __DIR__ . '/../../bootstrap.php';

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="PHPUnit\TestFixture\TestRunnerStopping\SkippedTest" file="%sSkippedTest.php" tests="2" assertions="1" errors="0" failures="0" skipped="1" time="%s">
<testcase name="testOne" file="%sSkippedTest.php" line="16" class="PHPUnit\TestFixture\TestRunnerStopping\SkippedTest" classname="PHPUnit.TestFixture.TestRunnerStopping.SkippedTest" assertions="0" time="%s">
<skipped/>
</testcase>
<testcase name="testTwo" file="%sSkippedTest.php" line="21" class="PHPUnit\TestFixture\TestRunnerStopping\SkippedTest" classname="PHPUnit.TestFixture.TestRunnerStopping.SkippedTest" assertions="1" time="%s"/>
</testsuite>
</testsuites>

0 comments on commit 7047343

Please sign in to comment.