| @@ 52-63 (lines=12) @@ | ||
| 49 | * @param \Exception $e |
|
| 50 | * @param float $time |
|
| 51 | */ |
|
| 52 | public function addError(Test $test, \Exception $e, $time) |
|
| 53 | { |
|
| 54 | $this->writeCase( |
|
| 55 | 'error', |
|
| 56 | $time, |
|
| 57 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 58 | TestFailure::exceptionToString($e), |
|
| 59 | $test |
|
| 60 | ); |
|
| 61 | ||
| 62 | $this->currentTestPass = false; |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * A warning occurred. |
|
| @@ 72-83 (lines=12) @@ | ||
| 69 | * @param Warning $e |
|
| 70 | * @param float $time |
|
| 71 | */ |
|
| 72 | public function addWarning(Test $test, Warning $e, $time) |
|
| 73 | { |
|
| 74 | $this->writeCase( |
|
| 75 | 'warning', |
|
| 76 | $time, |
|
| 77 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 78 | TestFailure::exceptionToString($e), |
|
| 79 | $test |
|
| 80 | ); |
|
| 81 | ||
| 82 | $this->currentTestPass = false; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * A failure occurred. |
|
| @@ 92-103 (lines=12) @@ | ||
| 89 | * @param AssertionFailedError $e |
|
| 90 | * @param float $time |
|
| 91 | */ |
|
| 92 | public function addFailure(Test $test, AssertionFailedError $e, $time) |
|
| 93 | { |
|
| 94 | $this->writeCase( |
|
| 95 | 'fail', |
|
| 96 | $time, |
|
| 97 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 98 | TestFailure::exceptionToString($e), |
|
| 99 | $test |
|
| 100 | ); |
|
| 101 | ||
| 102 | $this->currentTestPass = false; |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Incomplete test. |
|
| @@ 112-123 (lines=12) @@ | ||
| 109 | * @param \Exception $e |
|
| 110 | * @param float $time |
|
| 111 | */ |
|
| 112 | public function addIncompleteTest(Test $test, \Exception $e, $time) |
|
| 113 | { |
|
| 114 | $this->writeCase( |
|
| 115 | 'error', |
|
| 116 | $time, |
|
| 117 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 118 | 'Incomplete Test: ' . $e->getMessage(), |
|
| 119 | $test |
|
| 120 | ); |
|
| 121 | ||
| 122 | $this->currentTestPass = false; |
|
| 123 | } |
|
| 124 | ||
| 125 | /** |
|
| 126 | * Risky test. |
|
| @@ 132-143 (lines=12) @@ | ||
| 129 | * @param \Exception $e |
|
| 130 | * @param float $time |
|
| 131 | */ |
|
| 132 | public function addRiskyTest(Test $test, \Exception $e, $time) |
|
| 133 | { |
|
| 134 | $this->writeCase( |
|
| 135 | 'error', |
|
| 136 | $time, |
|
| 137 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 138 | 'Risky Test: ' . $e->getMessage(), |
|
| 139 | $test |
|
| 140 | ); |
|
| 141 | ||
| 142 | $this->currentTestPass = false; |
|
| 143 | } |
|
| 144 | ||
| 145 | /** |
|
| 146 | * Skipped test. |
|
| @@ 152-163 (lines=12) @@ | ||
| 149 | * @param \Exception $e |
|
| 150 | * @param float $time |
|
| 151 | */ |
|
| 152 | public function addSkippedTest(Test $test, \Exception $e, $time) |
|
| 153 | { |
|
| 154 | $this->writeCase( |
|
| 155 | 'error', |
|
| 156 | $time, |
|
| 157 | Util\Filter::getFilteredStacktrace($e, false), |
|
| 158 | 'Skipped Test: ' . $e->getMessage(), |
|
| 159 | $test |
|
| 160 | ); |
|
| 161 | ||
| 162 | $this->currentTestPass = false; |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * A testsuite started. |
|