Skip to content

Commit

Permalink
Reproduce #3364: failing setup does not show up in Teamcity output
Browse files Browse the repository at this point in the history
  • Loading branch information
epdenouden authored and sebastianbergmann committed Nov 30, 2018
1 parent 420d8ca commit 6c47213
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/end-to-end/regression/GitHub/3364/Issue3364Test.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.
*/

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 tests/end-to-end/regression/GitHub/3364/issue-3364-test.phpt
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.

0 comments on commit 6c47213

Please sign in to comment.