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 @@ -849,13 +849,9 @@ function_exists('xdebug_start_function_monitor');
849
849
$ linesToBeUsed
850
850
);
851
851
} catch (UnintentionallyCoveredCodeException $ cce ) {
852
- $ this ->addFailure (
853
- $ test ,
854
- new UnintentionallyCoveredCodeError (
855
- 'This test executed code that is not listed as code to be covered or used: ' .
856
- PHP_EOL . $ cce ->getMessage ()
857
- ),
858
- $ time
852
+ $ unintentionallyCoveredCodeError = new UnintentionallyCoveredCodeError (
853
+ 'This test executed code that is not listed as code to be covered or used: ' .
854
+ PHP_EOL . $ cce ->getMessage ()
859
855
);
860
856
} catch (OriginalCodeCoverageException $ cce ) {
861
857
$ error = true ;
@@ -876,6 +872,12 @@ function_exists('xdebug_start_function_monitor');
876
872
$ this ->addFailure ($ test , $ e , $ time );
877
873
} elseif ($ warning ) {
878
874
$ this ->addWarning ($ test , $ e , $ time );
875
+ } elseif (isset ($ unintentionallyCoveredCodeError )) {
876
+ $ this ->addFailure (
877
+ $ test ,
878
+ $ unintentionallyCoveredCodeError ,
879
+ $ time
880
+ );
879
881
} elseif ($ this ->beStrictAboutTestsThatDoNotTestAnything &&
880
882
!$ test ->doesNotPerformAssertions () &&
881
883
$ test ->getNumAssertions () === 0 ) {
You can’t perform that action at this time.
0 commit comments