File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -867,13 +867,9 @@ function_exists('xdebug_start_function_monitor');
867
867
$ linesToBeUsed
868
868
);
869
869
} catch (UnintentionallyCoveredCodeException $ cce ) {
870
- $ this ->addFailure (
871
- $ test ,
872
- new UnintentionallyCoveredCodeError (
873
- 'This test executed code that is not listed as code to be covered or used: ' .
874
- PHP_EOL . $ cce ->getMessage ()
875
- ),
876
- $ time
870
+ $ unintentionallyCoveredCodeError = new UnintentionallyCoveredCodeError (
871
+ 'This test executed code that is not listed as code to be covered or used: ' .
872
+ PHP_EOL . $ cce ->getMessage ()
877
873
);
878
874
} catch (OriginalCodeCoverageException $ cce ) {
879
875
$ error = true ;
@@ -894,6 +890,12 @@ function_exists('xdebug_start_function_monitor');
894
890
$ this ->addFailure ($ test , $ e , $ time );
895
891
} elseif ($ warning ) {
896
892
$ this ->addWarning ($ test , $ e , $ time );
893
+ } elseif (isset ($ unintentionallyCoveredCodeError )) {
894
+ $ this ->addFailure (
895
+ $ test ,
896
+ $ unintentionallyCoveredCodeError ,
897
+ $ time
898
+ );
897
899
} elseif ($ this ->beStrictAboutTestsThatDoNotTestAnything &&
898
900
!$ test ->doesNotPerformAssertions () &&
899
901
$ test ->getNumAssertions () === 0 ) {
You can’t perform that action at this time.
0 commit comments