@@ 79-94 (lines=16) @@ | ||
76 | /** |
|
77 | * Gets the test case title. |
|
78 | */ |
|
79 | public function getTestCaseTitle(): string |
|
80 | { |
|
81 | foreach ($this->testCaseTests as $test) { |
|
82 | if ($test->type === TestResult::FAIL) { |
|
83 | return 'FAIL'; |
|
84 | } |
|
85 | } |
|
86 | ||
87 | foreach ($this->testCaseTests as $test) { |
|
88 | if ($test->type !== TestResult::PASS) { |
|
89 | return 'WARN'; |
|
90 | } |
|
91 | } |
|
92 | ||
93 | return 'PASS'; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * Gets the test case title color. |
|
@@ 99-114 (lines=16) @@ | ||
96 | /** |
|
97 | * Gets the test case title color. |
|
98 | */ |
|
99 | public function getTestCaseTitleColor(): string |
|
100 | { |
|
101 | foreach ($this->testCaseTests as $test) { |
|
102 | if ($test->type === TestResult::FAIL) { |
|
103 | return 'red'; |
|
104 | } |
|
105 | } |
|
106 | ||
107 | foreach ($this->testCaseTests as $test) { |
|
108 | if ($test->type !== TestResult::PASS) { |
|
109 | return 'yellow'; |
|
110 | } |
|
111 | } |
|
112 | ||
113 | return 'green'; |
|
114 | } |
|
115 | ||
116 | /** |
|
117 | * Returns the number of tests on the current test case. |