File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -687,22 +687,29 @@ private function invokeMethodsAfterLastTest(Event\Emitter $emitter): void
687
687
continue ;
688
688
}
689
689
690
+ $ methodCalledAfterLastTest = new Event \Code \ClassMethod (
691
+ $ this ->name ,
692
+ $ afterClassMethod ,
693
+ );
694
+
690
695
try {
691
696
call_user_func ([$ this ->name , $ afterClassMethod ]);
697
+ } catch (Throwable $ t ) {
698
+ }
692
699
693
- $ methodCalledAfterLastTest = new Event \ Code \ ClassMethod (
694
- $ this ->name ,
695
- $ afterClassMethod ,
696
- );
700
+ $ emitter -> testAfterLastTestMethodCalled (
701
+ $ this ->name ,
702
+ $ methodCalledAfterLastTest ,
703
+ );
697
704
698
- $ emitter ->testAfterLastTestMethodCalled (
705
+ $ methodsCalledAfterLastTest [] = $ methodCalledAfterLastTest ;
706
+
707
+ if (isset ($ t )) {
708
+ $ emitter ->testAfterLastTestMethodErrored (
699
709
$ this ->name ,
700
710
$ methodCalledAfterLastTest ,
711
+ Event \Code \ThrowableBuilder::from ($ t ),
701
712
);
702
-
703
- $ methodsCalledAfterLastTest [] = $ methodCalledAfterLastTest ;
704
- } catch (Throwable ) {
705
- // @todo
706
713
}
707
714
}
708
715
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ Test Prepared (PHPUnit\TestFixture\Event\ExceptionInTearDownAfterClassTest::test
24
24
Assertion Succeeded (Constraint: is true , Value: true )
25
25
Test Passed (PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest::testOne)
26
26
Test Finished (PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest::testOne)
27
+ After Last Test Method Called (PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest::tearDownAfterClass)
28
+ After Last Test Method Errored (PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest::tearDownAfterClass)
29
+ After Last Test Method Finished:
30
+ - PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest::tearDownAfterClass
27
31
Test Suite Finished (PHPUnit \TestFixture \Event \ExceptionInTearDownAfterClassTest, 1 test)
28
32
Test Runner Execution Finished
29
33
Test Runner Finished
You can’t perform that action at this time.
0 commit comments