Skip to content

Commit 6c47213

Browse files
epdenoudensebastianbergmann
authored andcommitted
Reproduce #3364: failing setup does not show up in Teamcity output
1 parent 420d8ca commit 6c47213

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
declare(strict_types=1);
3+
/*
4+
* This file is part of PHPUnit.
5+
*
6+
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
use PHPUnit\Framework\TestCase;
13+
14+
class Issue3364Test extends TestCase
15+
{
16+
public static function setUpBeforeClass(): void
17+
{
18+
throw new \RuntimeException('Something\'s not quite right!');
19+
}
20+
21+
public function testSomething(): void
22+
{
23+
$this->fail('This cannot work!');
24+
}
25+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/3364
3+
--FILE--
4+
<?php
5+
$_SERVER['argv'][1] = '--no-configuration';
6+
$_SERVER['argv'][2] = '--teamcity';
7+
$_SERVER['argv'][3] = __DIR__ . '/Issue3364Test.php';
8+
9+
require __DIR__ . '/../../../../bootstrap.php';
10+
PHPUnit\TextUI\Command::main();
11+
--EXPECTF--
12+
PHPUnit %s by Sebastian Bergmann and contributors.
13+
14+
15+
##teamcity[testCount count='1' flowId='%d']
16+
17+
##teamcity[testSuiteStarted name='Issue3364Test' locationHint='php_qn://%s%etests%eend-to-end%eregression%eGitHub%e3364%eIssue3364Test.php::\Issue3364Test' flowId='%d']
18+
19+
##teamcity[testStarted name='testSomething' locationHint='php_qn://%s%etests%eend-to-end%eregression%eGitHub%e3364%eIssue3364Test.php::\Issue3364Test::testSomething' flowId='%d']
20+
21+
##teamcity[testFailed name='testSomething' message='RuntimeException : Something|'s not quite right!' details=' %s%etests%eend-to-end%eregression%eGitHub%e3364%eIssue3364Test.php:17|n%s' duration='%d' flowId='%d']
22+
23+
##teamcity[testFinished name='testSomething' duration='%d' flowId='%d']
24+
25+
##teamcity[testSuiteFinished name='Issue3364Test' flowId='%d']
26+
27+
28+
Time: %s, Memory: %s
29+
30+
31+
ERRORS!
32+
Tests: 1, Assertions: 0, Errors: 1.

0 commit comments

Comments
 (0)