Skip to content

Commit df90e85

Browse files
committed
Merge branch 'release/1.0.2'
2 parents 85fcdb7 + 2b63104 commit df90e85

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"type": "library",
55
"license": "MIT",
66
"minimum-stability": "dev",
7+
"prefer-stable" : true,
78
"require": {
89
"php": ">=7.0.0",
910
"phpunit/phpunit": ">=6.0.0"

src/PrettyPrinter.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public function endTest(Test $test, $time)
5151
$this->write(' ');
5252
$this->writeWithColor($color, $name, false);
5353
$this->write(' ');
54-
$this->writeWithColor('fg-white', '[' . number_format($time, 3) . 's]', true);
54+
55+
$timeColor = $time > 0.5 ? 'fg-yellow' : 'fg-white';
56+
$this->writeWithColor($timeColor, '[' . number_format($time, 3) . 's]', true);
5557
}
5658

5759
protected function writeProgress($progress)
@@ -84,8 +86,8 @@ protected function printDefectTrace(TestFailure $defect)
8486
while ($exception) {
8587
$this->write(
8688
"\nCaused by\n" .
87-
TestFailure::exceptionToString($e) . "\n" .
88-
Filter::getFilteredStacktrace($e)
89+
TestFailure::exceptionToString($exception) . "\n" .
90+
Filter::getFilteredStacktrace($exception)
8991
);
9092
$exception = $exception->getPrevious();
9193
}

0 commit comments

Comments
 (0)