-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduce #3364: failing setup does not show up in Teamcity output
- Loading branch information
1 parent
420d8ca
commit 6c47213
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
*/ | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class Issue3364Test extends TestCase | ||
{ | ||
public static function setUpBeforeClass(): void | ||
{ | ||
throw new \RuntimeException('Something\'s not quite right!'); | ||
} | ||
|
||
public function testSomething(): void | ||
{ | ||
$this->fail('This cannot work!'); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
tests/end-to-end/regression/GitHub/3364/issue-3364-test.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--TEST-- | ||
https://github.com/sebastianbergmann/phpunit/issues/3364 | ||
--FILE-- | ||
<?php | ||
$_SERVER['argv'][1] = '--no-configuration'; | ||
$_SERVER['argv'][2] = '--teamcity'; | ||
$_SERVER['argv'][3] = __DIR__ . '/Issue3364Test.php'; | ||
|
||
require __DIR__ . '/../../../../bootstrap.php'; | ||
PHPUnit\TextUI\Command::main(); | ||
--EXPECTF-- | ||
PHPUnit %s by Sebastian Bergmann and contributors. | ||
|
||
|
||
##teamcity[testCount count='1' flowId='%d'] | ||
|
||
##teamcity[testSuiteStarted name='Issue3364Test' locationHint='php_qn://%s%etests%eend-to-end%eregression%eGitHub%e3364%eIssue3364Test.php::\Issue3364Test' flowId='%d'] | ||
|
||
##teamcity[testStarted name='testSomething' locationHint='php_qn://%s%etests%eend-to-end%eregression%eGitHub%e3364%eIssue3364Test.php::\Issue3364Test::testSomething' flowId='%d'] | ||
|
||
##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'] | ||
|
||
##teamcity[testFinished name='testSomething' duration='%d' flowId='%d'] | ||
|
||
##teamcity[testSuiteFinished name='Issue3364Test' flowId='%d'] | ||
|
||
|
||
Time: %s, Memory: %s | ||
|
||
|
||
ERRORS! | ||
Tests: 1, Assertions: 0, Errors: 1. |