@@ -42,7 +42,7 @@ public function __construct($plan = null, $options = array())
42
42
'force_colors ' => false ,
43
43
'output ' => null ,
44
44
'verbose ' => false ,
45
- 'error_reporting ' => false ,
45
+ 'error_reporting ' => true ,
46
46
), $ options );
47
47
48
48
$ this ->output = $ this ->options ['output ' ] ? $ this ->options ['output ' ] : new lime_output ($ this ->options ['force_colors ' ]);
@@ -140,6 +140,7 @@ public function __destruct()
140
140
$ plan = $ this ->results ['stats ' ]['plan ' ];
141
141
$ passed = count ($ this ->results ['stats ' ]['passed ' ]);
142
142
$ failed = count ($ this ->results ['stats ' ]['failed ' ]);
143
+ $ errors = count ($ this ->results ['stats ' ]['errors ' ]);
143
144
$ total = $ this ->results ['stats ' ]['total ' ];
144
145
is_null ($ plan ) and $ plan = $ total and $ this ->output ->echoln (sprintf ("1..%d " , $ plan ));
145
146
@@ -156,6 +157,10 @@ public function __destruct()
156
157
{
157
158
$ this ->output ->red_bar (sprintf ("# Looks like you failed %d tests of %d. " , $ failed , $ passed + $ failed ));
158
159
}
160
+ else if ($ errors )
161
+ {
162
+ $ this ->output ->red_bar (sprintf ("# Looks like test pass but with %d errors. " , $ errors ));
163
+ }
159
164
else if ($ total == $ plan )
160
165
{
161
166
$ this ->output ->green_bar ("# Looks like everything went fine. " );
@@ -174,10 +179,11 @@ private function getExitCode()
174
179
{
175
180
$ plan = $ this ->results ['stats ' ]['plan ' ];
176
181
$ failed = count ($ this ->results ['stats ' ]['failed ' ]);
182
+ $ errors = count ($ this ->results ['stats ' ]['errors ' ]);
177
183
$ total = $ this ->results ['stats ' ]['total ' ];
178
184
is_null ($ plan ) and $ plan = $ total and $ this ->output ->echoln (sprintf ("1..%d " , $ plan ));
179
185
180
- if ($ failed )
186
+ if ($ failed || $ errors )
181
187
{
182
188
return 1 ;
183
189
}
@@ -608,6 +614,12 @@ public function handle_error($code, $message, $file, $line, $context = null)
608
614
case E_WARNING :
609
615
$ type = 'Warning ' ;
610
616
break ;
617
+ case E_STRICT :
618
+ $ type = 'Strict ' ;
619
+ break ;
620
+ case E_DEPRECATED :
621
+ $ type = 'Deprecated ' ;
622
+ break ;
611
623
default :
612
624
$ type = 'Notice ' ;
613
625
break ;
0 commit comments