|
6 | 6 | use PHPUnit\Framework\TestFailure;
|
7 | 7 | use PHPUnit\Framework\TestListener;
|
8 | 8 | use PHPUnit\Framework\TestSuite;
|
| 9 | +use PHPUnit\Runner\BaseTestRunner; |
9 | 10 | use PHPUnit\TextUI\ResultPrinter;
|
10 | 11 | use PHPUnit\Util\Filter;
|
11 | 12 |
|
@@ -54,26 +55,30 @@ public function endTest(Test $test, float $time): void
|
54 | 55 | $this->write(' ');
|
55 | 56 |
|
56 | 57 | switch ($test->getStatus()) {
|
57 |
| - case 0: |
| 58 | + case BaseTestRunner::STATUS_PASSED: |
58 | 59 | $this->writeWithColor('fg-green', $name, false);
|
59 | 60 | break;
|
60 |
| - case 1: |
| 61 | + case BaseTestRunner::STATUS_SKIPPED: |
61 | 62 | $this->writeWithColor('fg-yellow', $name, false);
|
62 | 63 | break;
|
63 |
| - case 2: |
| 64 | + case BaseTestRunner::STATUS_INCOMPLETE: |
64 | 65 | $this->writeWithColor('fg-blue', $name, false);
|
65 | 66 | break;
|
66 |
| - case 3: |
| 67 | + case BaseTestRunner::STATUS_FAILURE: |
67 | 68 | $this->writeWithColor('fg-red', $name, false);
|
68 | 69 | break;
|
69 |
| - case 4: |
| 70 | + case BaseTestRunner::STATUS_ERROR: |
70 | 71 | $this->writeWithColor('fg-red', $name, false);
|
71 | 72 | break;
|
72 |
| - case 5: |
| 73 | + case BaseTestRunner::STATUS_RISKY: |
73 | 74 | $this->writeWithColor('fg-magenta', $name, false);
|
74 | 75 | break;
|
| 76 | + case BaseTestRunner::STATUS_WARNING: |
| 77 | + $this->writeWithColor('fg-yellow', $name, false); |
| 78 | + break; |
| 79 | + case BaseTestRunner::STATUS_UNKNOWN: |
75 | 80 | default:
|
76 |
| - $this->writeWithColor('fg-red', $name, false); |
| 81 | + $this->writeWithColor('fg-cyan', $name, false); |
77 | 82 | break;
|
78 | 83 | }
|
79 | 84 |
|
@@ -112,8 +117,11 @@ protected function writeProgress(string $progress): void
|
112 | 117 | case 'R':
|
113 | 118 | $this->writeWithColor('fg-magenta', ' ⌽', false);
|
114 | 119 | break;
|
| 120 | + case 'W': |
| 121 | + $this->writeWithColor('fg-yellow', ' ¤', false); |
| 122 | + break; |
115 | 123 | default:
|
116 |
| - $this->writeWithColor('fg-red', ' #', false); |
| 124 | + $this->writeWithColor('fg-cyan', ' ≈', false); |
117 | 125 | break;
|
118 | 126 | }
|
119 | 127 | }
|
|
0 commit comments