@@ 59-70 (lines=12) @@ | ||
56 | * @param \Exception $exception |
|
57 | * @param float $time |
|
58 | */ |
|
59 | public function addError(Test $test, \Exception $exception, $time) |
|
60 | { |
|
61 | $this->writeCase( |
|
62 | self::STATUS_ERROR, |
|
63 | $time, |
|
64 | $this->getStackTrace($exception), |
|
65 | TestFailure::exceptionToString($exception), |
|
66 | $test |
|
67 | ); |
|
68 | ||
69 | $this->currentTestPass = false; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * A warning occurred. |
|
@@ 79-90 (lines=12) @@ | ||
76 | * @param Warning $warning |
|
77 | * @param float $time |
|
78 | */ |
|
79 | public function addWarning(Test $test, Warning $warning, $time) |
|
80 | { |
|
81 | $this->writeCase( |
|
82 | self::STATUS_WARNING, |
|
83 | $time, |
|
84 | $this->getStackTrace($warning), |
|
85 | TestFailure::exceptionToString($warning), |
|
86 | $test |
|
87 | ); |
|
88 | ||
89 | $this->currentTestPass = false; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * A failure occurred. |
|
@@ 99-110 (lines=12) @@ | ||
96 | * @param AssertionFailedError $error |
|
97 | * @param float $time |
|
98 | */ |
|
99 | public function addFailure(Test $test, AssertionFailedError $error, $time) |
|
100 | { |
|
101 | $this->writeCase( |
|
102 | self::STATUS_FAIL, |
|
103 | $time, |
|
104 | $this->getStackTrace($error), |
|
105 | TestFailure::exceptionToString($error), |
|
106 | $test |
|
107 | ); |
|
108 | ||
109 | $this->currentTestPass = false; |
|
110 | } |
|
111 | ||
112 | /** |
|
113 | * Incomplete test. |
|
@@ 119-130 (lines=12) @@ | ||
116 | * @param \Exception $error |
|
117 | * @param float $time |
|
118 | */ |
|
119 | public function addIncompleteTest(Test $test, \Exception $error, $time) |
|
120 | { |
|
121 | $this->writeCase( |
|
122 | self::STATUS_ERROR, |
|
123 | $time, |
|
124 | $this->getStackTrace($error), |
|
125 | self::MESSAGE_INCOMPLETE_TEST . $error->getMessage(), |
|
126 | $test |
|
127 | ); |
|
128 | ||
129 | $this->currentTestPass = false; |
|
130 | } |
|
131 | ||
132 | /** |
|
133 | * Risky test. |
|
@@ 139-150 (lines=12) @@ | ||
136 | * @param \Exception $exception |
|
137 | * @param float $time |
|
138 | */ |
|
139 | public function addRiskyTest(Test $test, \Exception $exception, $time) |
|
140 | { |
|
141 | $this->writeCase( |
|
142 | self::STATUS_ERROR, |
|
143 | $time, |
|
144 | $this->getStackTrace($exception), |
|
145 | self::MESSAGE_RISKY_TEST . $exception->getMessage(), |
|
146 | $test |
|
147 | ); |
|
148 | ||
149 | $this->currentTestPass = false; |
|
150 | } |
|
151 | ||
152 | /** |
|
153 | * Skipped test. |
|
@@ 159-170 (lines=12) @@ | ||
156 | * @param \Exception $exception |
|
157 | * @param float $time |
|
158 | */ |
|
159 | public function addSkippedTest(Test $test, \Exception $exception, $time) |
|
160 | { |
|
161 | $this->writeCase( |
|
162 | self::STATUS_ERROR, |
|
163 | $time, |
|
164 | $this->getStackTrace($exception), |
|
165 | self::MESSAGE_SKIPPED_TEST . $exception->getMessage(), |
|
166 | $test |
|
167 | ); |
|
168 | ||
169 | $this->currentTestPass = false; |
|
170 | } |
|
171 | ||
172 | /** |
|
173 | * A testsuite started. |