| @@ 118-148 (lines=31) @@ | ||
| 115 | $this->write(': ', $this->writer->punctuationStyle); |
|
| 116 | } |
|
| 117 | ||
| 118 | public function endPhaseGroup($result) |
|
| 119 | { |
|
| 120 | // tell the user what happened |
|
| 121 | $this->write(' '); |
|
| 122 | if ($result->getPhaseGroupSkipped()) { |
|
| 123 | $this->writePhaseGroupSkipped($result->getResultString()); |
|
| 124 | } |
|
| 125 | else if ($result->getPhaseGroupSucceeded()) { |
|
| 126 | $this->writePhaseGroupSucceeded($result->getResultString()); |
|
| 127 | } |
|
| 128 | else { |
|
| 129 | $this->writePhaseGroupFailed($result->getResultString()); |
|
| 130 | } |
|
| 131 | ||
| 132 | // write out the duration too |
|
| 133 | $this->write(' (', $this->writer->punctuationStyle); |
|
| 134 | $this->writeDuration($result->getDuration()); |
|
| 135 | $this->write(')' . PHP_EOL, $this->writer->punctuationStyle); |
|
| 136 | ||
| 137 | // remember the result for the final report |
|
| 138 | // |
|
| 139 | // we have to clone as the result object apparently changes |
|
| 140 | // afterwards. no idea why (yet) |
|
| 141 | $this->results[] = clone $result; |
|
| 142 | ||
| 143 | // if we are not connected to a terminal, we need to write out |
|
| 144 | // a detailed error report |
|
| 145 | if (!function_exists("posix_isatty") || !posix_isatty(STDOUT)) { |
|
| 146 | $this->writeDetailedErrorReport($result); |
|
| 147 | } |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * called when a story starts a new phase |
|
| @@ 126-156 (lines=31) @@ | ||
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | public function endPhaseGroup($result) |
|
| 127 | { |
|
| 128 | // tell the user what happened |
|
| 129 | $this->write(' Result: '); |
|
| 130 | if ($result->getPhaseGroupSkipped()) { |
|
| 131 | $this->writePhaseGroupSkipped($result->getResultString()); |
|
| 132 | } |
|
| 133 | else if ($result->getPhaseGroupSucceeded()) { |
|
| 134 | $this->writePhaseGroupSucceeded($result->getResultString()); |
|
| 135 | } |
|
| 136 | else { |
|
| 137 | $this->writePhaseGroupFailed($result->getResultString()); |
|
| 138 | } |
|
| 139 | ||
| 140 | // write out the duration too |
|
| 141 | $this->write(' (', $this->writer->punctuationStyle); |
|
| 142 | $this->writeDuration($result->getDuration()); |
|
| 143 | $this->write(')' . PHP_EOL, $this->writer->punctuationStyle); |
|
| 144 | ||
| 145 | // remember the result for the final report |
|
| 146 | // |
|
| 147 | // we have to clone as the result object apparently changes |
|
| 148 | // afterwards. no idea why (yet) |
|
| 149 | $this->results[] = clone $result; |
|
| 150 | ||
| 151 | // if we are not connected to a terminal, we need to write out |
|
| 152 | // a detailed error report |
|
| 153 | if (!function_exists("posix_isatty") || !posix_isatty(STDOUT)) { |
|
| 154 | $this->writeDetailedErrorReport($result); |
|
| 155 | } |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * called when a story starts a new phase |
|