@@ -42,7 +42,7 @@ public function __construct($plan = null, $options = array())
4242 'force_colors ' => false ,
4343 'output ' => null ,
4444 'verbose ' => false ,
45- 'error_reporting ' => false ,
45+ 'error_reporting ' => true ,
4646 ), $ options );
4747
4848 $ this ->output = $ this ->options ['output ' ] ? $ this ->options ['output ' ] : new lime_output ($ this ->options ['force_colors ' ]);
@@ -140,6 +140,7 @@ public function __destruct()
140140 $ plan = $ this ->results ['stats ' ]['plan ' ];
141141 $ passed = count ($ this ->results ['stats ' ]['passed ' ]);
142142 $ failed = count ($ this ->results ['stats ' ]['failed ' ]);
143+ $ errors = count ($ this ->results ['stats ' ]['errors ' ]);
143144 $ total = $ this ->results ['stats ' ]['total ' ];
144145 is_null ($ plan ) and $ plan = $ total and $ this ->output ->echoln (sprintf ("1..%d " , $ plan ));
145146
@@ -156,6 +157,10 @@ public function __destruct()
156157 {
157158 $ this ->output ->red_bar (sprintf ("# Looks like you failed %d tests of %d. " , $ failed , $ passed + $ failed ));
158159 }
160+ else if ($ errors )
161+ {
162+ $ this ->output ->red_bar (sprintf ("# Looks like test pass but with %d errors. " , $ errors ));
163+ }
159164 else if ($ total == $ plan )
160165 {
161166 $ this ->output ->green_bar ("# Looks like everything went fine. " );
@@ -174,10 +179,11 @@ private function getExitCode()
174179 {
175180 $ plan = $ this ->results ['stats ' ]['plan ' ];
176181 $ failed = count ($ this ->results ['stats ' ]['failed ' ]);
182+ $ errors = count ($ this ->results ['stats ' ]['errors ' ]);
177183 $ total = $ this ->results ['stats ' ]['total ' ];
178184 is_null ($ plan ) and $ plan = $ total and $ this ->output ->echoln (sprintf ("1..%d " , $ plan ));
179185
180- if ($ failed )
186+ if ($ failed || $ errors )
181187 {
182188 return 1 ;
183189 }
@@ -608,6 +614,12 @@ public function handle_error($code, $message, $file, $line, $context = null)
608614 case E_WARNING :
609615 $ type = 'Warning ' ;
610616 break ;
617+ case E_STRICT :
618+ $ type = 'Strict ' ;
619+ break ;
620+ case E_DEPRECATED :
621+ $ type = 'Deprecated ' ;
622+ break ;
611623 default :
612624 $ type = 'Notice ' ;
613625 break ;
0 commit comments