Skip to content

Commit

Permalink
Add test for #5561
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 23, 2023
1 parent 297f268 commit 538b237
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/end-to-end/regression/5561.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5561
--XFAIL--
https://github.com/sebastianbergmann/phpunit/issues/5561
--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__ . '/5561/Issue5561Test.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\Issue5561\Issue5561Test" file="%sIssue5561Test.php" tests="1" assertions="0" errors="0" failures="1" skipped="0" time="%s">
<testcase name="testOne" file="%sIssue5561Test.php" line="21" class="PHPUnit\TestFixture\Issue5561\Issue5561Test" classname="PHPUnit.TestFixture.Issue5561.Issue5561Test" assertions="0" time="%s">
<failure type="PHPUnit\Framework\ExpectationFailedException">PHPUnit\TestFixture\Issue5561\Issue5561Test::testOne
Failed asserting that false is true.

%sIssue5561Test.php:18</failure>
</testcase>
</testsuite>
</testsuites>
25 changes: 25 additions & 0 deletions tests/end-to-end/regression/5561/Issue5561Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\TestFixture\Issue5561;

use PHPUnit\Framework\TestCase;

final class Issue5561Test extends TestCase
{
protected function setUp(): void
{
$this->assertTrue(false);
}

public function testOne(): void
{
$this->assertTrue(true);
}
}

0 comments on commit 538b237

Please sign in to comment.