From 60e4c011de8c7d5223a4dbed43aae27903a35fff Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 21 Apr 2017 12:12:20 +1200 Subject: [PATCH] Removed TeamCityListener --- docs/en/04_Changelogs/4.0.0.md | 1 + src/Dev/TeamCityListener.php | 94 ---------------------------------- 2 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 src/Dev/TeamCityListener.php diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index b933859bf..ddec0547a 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -1246,6 +1246,7 @@ After (`mysite/_config/config.yml`): * Removed `FunctionalTest::stat` * Removed `LeftAndMainMarkingFilter` * Removed `Controller::getFormOwner` +* Removed `TeamCityListener` * The Spyc YAML library has been removed from /thirdparty. Please load it yourself, or use the Symfony YAML component that’s automatically installed by composer. * `RestfulService` has been removed. Use Guzzle instead. See Upgrading notes. diff --git a/src/Dev/TeamCityListener.php b/src/Dev/TeamCityListener.php deleted file mode 100644 index 44d117509..000000000 --- a/src/Dev/TeamCityListener.php +++ /dev/null @@ -1,94 +0,0 @@ - '|n', - "\r" => '|r', - "[" => '|[', - "]" => '|]', - "'" => "|'", - "|" => '||' - )); - } - - public function startTestSuite(PHPUnit_Framework_TestSuite $suite) - { - echo "##teamcity[testSuiteStarted name='{$suite->getName()}']\n"; - } - - public function endTestSuite(PHPUnit_Framework_TestSuite $suite) - { - echo "##teamcity[testSuiteFinished name='{$suite->getName()}']\n"; - } - - public function startTest(PHPUnit_Framework_Test $test) - { - $class = get_class($test); - echo "##teamcity[testStarted name='{$class}.{$test->getName()}']\n"; - } - - public function endTest(PHPUnit_Framework_Test $test, $time) - { - $class = get_class($test); - echo "##teamcity[testFinished name='{$class}.{$test->getName()}' duration='$time']\n"; - } - - public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) - { - $class = get_class($test); - $message = $this->escape("Exception: {$e->getMessage()}"); - $trace = $this->escape($e->getTraceAsString()); - echo "##teamcity[testFailed type='exception' name='{$class}.{$test->getName()}' message='$message'" - . " details='$trace']\n"; - } - - public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) - { - $class = get_class($test); - $message = $this->escape(PHPUnit_Framework_TestFailure::exceptionToString($e)); - $trace = $this->escape($e->getTraceAsString()); - echo "##teamcity[testFailed type='failure' name='{$class}.{$test->getName()}' message='$message'" - . " details='$trace']\n"; - } - - public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) - { - // NOP - } - - public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) - { - $class = get_class($test); - $message = $this->escape($e->getMessage()); - echo "##teamcity[testIgnored name='{$class}.{$test->getName()}' message='$message']\n"; - } - - /** - * Risky test. - * - * @param PHPUnit_Framework_Test $test - * @param Exception $e - * @param float $time - * @since Method available since Release 3.8.0 - */ - public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) - { - // Stub out to support PHPUnit 3.8 - } -}