@@ 90-103 (lines=14) @@ | ||
87 | * |
|
88 | * @return string |
|
89 | */ |
|
90 | public function getTestCaseTitle(): string |
|
91 | { |
|
92 | foreach ($this->testCaseTests as $test) { |
|
93 | if ($test->type === TestResult::FAIL) { |
|
94 | return 'FAIL'; |
|
95 | } |
|
96 | ||
97 | if ($test->type !== TestResult::PASS) { |
|
98 | return 'WARN'; |
|
99 | } |
|
100 | } |
|
101 | ||
102 | return 'PASS'; |
|
103 | } |
|
104 | ||
105 | /** |
|
106 | * Gets the test case title color. |
|
@@ 110-123 (lines=14) @@ | ||
107 | * |
|
108 | * @return string |
|
109 | */ |
|
110 | public function getTestCaseTitleColor(): string |
|
111 | { |
|
112 | foreach ($this->testCaseTests as $test) { |
|
113 | if ($test->type === TestResult::FAIL) { |
|
114 | return 'red'; |
|
115 | } |
|
116 | ||
117 | if ($test->type !== TestResult::PASS) { |
|
118 | return 'yellow'; |
|
119 | } |
|
120 | } |
|
121 | ||
122 | return 'green'; |
|
123 | } |
|
124 | ||
125 | /** |
|
126 | * Returns the number of tests on the current test case. |