Compare commits

...

4 Commits

Author SHA1 Message Date
1bdd3f4908 Update Pest.php 2020-11-09 10:56:14 +01:00
924e095dfc chore: updates changelog 2020-11-09 10:55:22 +01:00
72041a4a21 Merge pull request #215 from olivernybroe/teamcity-exception
Improve exception output in teamcity printer
2020-11-09 10:52:08 +01:00
d576446639 Improve exception output in teamcity printer 2020-11-04 09:17:57 +01:00
3 changed files with 6 additions and 29 deletions

View File

@ -4,7 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## [v0.3.11 (2020-11-09)](https://github.com/pestphp/pest/compare/v0.3.10...v0.3.11)
### Changed
- Improved the exception output for the TeamCity printer (usage with phpstorm plugin) ([#215](https://github.com/pestphp/pest/pull/215))
## [v0.3.10 (2020-11-01)](https://github.com/pestphp/pest/compare/v0.3.9...v0.3.10)
### Added

View File

@ -6,5 +6,5 @@ namespace Pest;
function version(): string
{
return '0.3.9';
return '0.3.11';
}

View File

@ -24,7 +24,6 @@ final class TeamCity extends DefaultResultPrinter
private const DURATION = 'duration';
private const TEST_SUITE_STARTED = 'testSuiteStarted';
private const TEST_SUITE_FINISHED = 'testSuiteFinished';
private const TEST_FAILED = 'testFailed';
/** @var int */
private $flowId;
@ -149,19 +148,7 @@ final class TeamCity extends DefaultResultPrinter
*/
public function addError(Test $test, Throwable $t, float $time): void
{
if (!TeamCity::isPestTest($test)) {
$this->phpunitTeamCity->addError($test, $t, $time);
return;
}
$this->printEvent(
self::TEST_FAILED, [
self::NAME => $test->getName(),
'message' => $t->getMessage(),
'details' => $t->getTraceAsString(),
self::DURATION => self::toMilliseconds($time),
]);
}
/**
@ -171,19 +158,7 @@ final class TeamCity extends DefaultResultPrinter
*/
public function addWarning(Test $test, Warning $e, float $time): void
{
if (!TeamCity::isPestTest($test)) {
$this->phpunitTeamCity->addWarning($test, $e, $time);
return;
}
$this->printEvent(
self::TEST_FAILED, [
self::NAME => $test->getName(),
'message' => $e->getMessage(),
'details' => $e->getTraceAsString(),
self::DURATION => self::toMilliseconds($time),
]);
}
public function addFailure(Test $test, AssertionFailedError $e, float $time): void