Skip to content

Commit 3977933

Browse files
Add test for #5760
1 parent e98f990 commit 3977933

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

tests/end-to-end/regression/5760.phpt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/5760
3+
--XFAIL--
4+
https://github.com/sebastianbergmann/phpunit/issues/5760
5+
--FILE--
6+
<?php declare(strict_types=1);
7+
$_SERVER['argv'][] = '--do-not-cache-result';
8+
$_SERVER['argv'][] = '--no-configuration';
9+
$_SERVER['argv'][] = '--testdox';
10+
$_SERVER['argv'][] = __DIR__ . '/5760/Issue5760Test.php';
11+
12+
require_once __DIR__ . '/../../bootstrap.php';
13+
14+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
15+
--EXPECTF--
16+
PHPUnit %s by Sebastian Bergmann and contributors.
17+
18+
Runtime: %s
19+
20+
E 1 / 1 (100%)
21+
22+
Time: %s, Memory: %s
23+
24+
Issue5760 (PHPUnit\TestFixture\Issue5760\Issue5760)
25+
✘ One
26+
27+
│ Exception: message
28+
29+
│ %s:19
30+
31+
32+
ERRORS!
33+
Tests: 1, Assertions: 0, Errors: 1.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\Issue5760;
11+
12+
use Exception;
13+
use PHPUnit\Framework\TestCase;
14+
15+
final class Issue5760Test extends TestCase
16+
{
17+
protected function setUp(): void
18+
{
19+
throw new Exception('message');
20+
}
21+
22+
public function testOne(): void
23+
{
24+
}
25+
}

0 commit comments

Comments
 (0)