@@ -161,13 +161,11 @@ private function determineAndPrintStateOfTestSuite(): int
161161 return self ::STATE_FAIL ;
162162 }
163163
164- if (self ::STATE_FAIL === $ planState ) {
165- return self :: STATE_PLAN_NOT_FOLLOW ;
164+ if (self ::STATE_PASS === $ planState ) {
165+ $ this -> output -> green_bar ( " # Looks like everything went fine. " ) ;
166166 }
167167
168- $ this ->output ->green_bar ("# Looks like everything went fine. " );
169-
170- return self ::STATE_PASS ;
168+ return $ planState ;
171169 }
172170
173171 private function determineAndPrintStateOfPlan (): int
@@ -187,7 +185,7 @@ private function determineAndPrintStateOfPlan(): int
187185 $ this ->output ->red_bar (sprintf ("# Looks like you planned %d tests but only ran %d. " , $ plan , $ total ));
188186 }
189187
190- return $ total === $ plan ? self ::STATE_PASS : self ::STATE_FAIL ;
188+ return $ total === $ plan ? self ::STATE_PASS : self ::STATE_PLAN_NOT_FOLLOW ;
191189 }
192190
193191 private function keepTheWorstState (int $ state ): void
@@ -1033,21 +1031,22 @@ function lime_shutdown()
10331031 $ file_stats = &$ stats ['output ' ][0 ]['stats ' ];
10341032
10351033 $ delta = 0 ;
1034+ $ this ->stats ['total ' ] += $ file_stats ['total ' ];
1035+
1036+ if (!$ file_stats ['plan ' ])
1037+ {
1038+ $ file_stats ['plan ' ] = $ file_stats ['total ' ];
1039+ }
1040+
1041+ $ delta = $ file_stats ['plan ' ] - $ file_stats ['total ' ];
1042+
10361043 if ($ return > 0 )
10371044 {
10381045 $ stats ['status ' ] = $ file_stats ['failed ' ] ? 'not ok ' : ($ file_stats ['errors ' ] ? 'errors ' : 'dubious ' );
10391046 $ stats ['status_code ' ] = $ return ;
10401047 }
10411048 else
10421049 {
1043- $ this ->stats ['total ' ] += $ file_stats ['total ' ];
1044-
1045- if (!$ file_stats ['plan ' ])
1046- {
1047- $ file_stats ['plan ' ] = $ file_stats ['total ' ];
1048- }
1049-
1050- $ delta = $ file_stats ['plan ' ] - $ file_stats ['total ' ];
10511050 if (0 != $ delta )
10521051 {
10531052 $ stats ['status ' ] = $ file_stats ['errors ' ] ? 'errors ' : 'dubious ' ;
0 commit comments