Skip to content

Commit 543f76a

Browse files
epdenoudensebastianbergmann
authored andcommitted
TeamCity logger skips over PhptTestCase events
1 parent df35f86 commit 543f76a

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/Util/Log/TeamCity.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public function printResult(TestResult $result): void
5757
*/
5858
public function addError(Test $test, \Throwable $t, float $time): void
5959
{
60-
if (!$test instanceof TestCase) {
61-
return;
62-
}
63-
6460
$this->printEvent(
6561
'testFailed',
6662
[
@@ -79,10 +75,6 @@ public function addError(Test $test, \Throwable $t, float $time): void
7975
*/
8076
public function addWarning(Test $test, Warning $e, float $time): void
8177
{
82-
if (!$test instanceof TestCase) {
83-
return;
84-
}
85-
8678
$this->printEvent(
8779
'testFailed',
8880
[
@@ -101,10 +93,6 @@ public function addWarning(Test $test, Warning $e, float $time): void
10193
*/
10294
public function addFailure(Test $test, AssertionFailedError $e, float $time): void
10395
{
104-
if (!$test instanceof TestCase) {
105-
return;
106-
}
107-
10896
$parameters = [
10997
'name' => $test->getName(),
11098
'message' => self::getMessage($e),
@@ -144,10 +132,6 @@ public function addFailure(Test $test, AssertionFailedError $e, float $time): vo
144132
*/
145133
public function addIncompleteTest(Test $test, \Throwable $t, float $time): void
146134
{
147-
if (!$test instanceof TestCase) {
148-
return;
149-
}
150-
151135
$this->printIgnoredTest($test->getName(), $t, $time);
152136
}
153137

@@ -158,10 +142,6 @@ public function addIncompleteTest(Test $test, \Throwable $t, float $time): void
158142
*/
159143
public function addRiskyTest(Test $test, \Throwable $t, float $time): void
160144
{
161-
if (!$test instanceof TestCase) {
162-
return;
163-
}
164-
165145
$this->addError($test, $t, $time);
166146
}
167147

@@ -172,10 +152,6 @@ public function addRiskyTest(Test $test, \Throwable $t, float $time): void
172152
*/
173153
public function addSkippedTest(Test $test, \Throwable $t, float $time): void
174154
{
175-
if (!$test instanceof TestCase) {
176-
return;
177-
}
178-
179155
$testName = $test->getName();
180156

181157
if ($this->startedTestName !== $testName) {
@@ -277,10 +253,6 @@ public function endTestSuite(TestSuite $suite): void
277253
*/
278254
public function startTest(Test $test): void
279255
{
280-
if (!$test instanceof TestCase) {
281-
return;
282-
}
283-
284256
$testName = $test->getName();
285257
$this->startedTestName = $testName;
286258
$params = ['name' => $testName];
@@ -299,10 +271,6 @@ public function startTest(Test $test): void
299271
*/
300272
public function endTest(Test $test, float $time): void
301273
{
302-
if (!$test instanceof TestCase) {
303-
return;
304-
}
305-
306274
parent::endTest($test, $time);
307275

308276
$this->printEvent(

0 commit comments

Comments
 (0)