@@ -206,24 +206,48 @@ public function testStart(TestEvent $testEvent)
206
206
$ this ->getLifecycle ()->fire ($ event );
207
207
}
208
208
209
- public function testError ()
209
+ /**
210
+ * @param FailEvent $failEvent
211
+ */
212
+ public function testError (FailEvent $ failEvent )
210
213
{
211
- $ this ->getLifecycle ()->fire (new TestCaseBrokenEvent ());
214
+ $ event = new TestCaseBrokenEvent ();
215
+ $ e = $ failEvent ->getFail ();
216
+ $ message = $ e ->getMessage ();
217
+ $ this ->getLifecycle ()->fire ($ event ->withException ($ e )->withMessage ($ message ));
212
218
}
213
219
214
- public function testFail ()
220
+ /**
221
+ * @param FailEvent $failEvent
222
+ */
223
+ public function testFail (FailEvent $ failEvent )
215
224
{
216
- $ this ->getLifecycle ()->fire (new TestCaseFailedEvent ());
225
+ $ event = new TestCaseFailedEvent ();
226
+ $ e = $ failEvent ->getFail ();
227
+ $ message = $ e ->getMessage ();
228
+ $ this ->getLifecycle ()->fire ($ event ->withException ($ e )->withMessage ($ message ));
217
229
}
218
230
219
- public function testIncomplete ()
231
+ /**
232
+ * @param FailEvent $failEvent
233
+ */
234
+ public function testIncomplete (FailEvent $ failEvent )
220
235
{
221
- $ this ->getLifecycle ()->fire (new TestCasePendingEvent ());
236
+ $ event = new TestCasePendingEvent ();
237
+ $ e = $ failEvent ->getFail ();
238
+ $ message = $ e ->getMessage ();
239
+ $ this ->getLifecycle ()->fire ($ event ->withException ($ e )->withMessage ($ message ));
222
240
}
223
241
224
- public function testSkipped ()
242
+ /**
243
+ * @param FailEvent $failEvent
244
+ */
245
+ public function testSkipped (FailEvent $ failEvent )
225
246
{
226
- $ this ->getLifecycle ()->fire (new TestCaseCanceledEvent ());
247
+ $ event = new TestCaseCanceledEvent ();
248
+ $ e = $ failEvent ->getFail ();
249
+ $ message = $ e ->getMessage ();
250
+ $ this ->getLifecycle ()->fire ($ event ->withException ($ e )->withMessage ($ message ));
227
251
}
228
252
229
253
public function testEnd ()
0 commit comments