File tree 1 file changed +23
-18
lines changed
1 file changed +23
-18
lines changed Original file line number Diff line number Diff line change @@ -1026,24 +1026,7 @@ function lime_shutdown()
1026
1026
$ output = file_get_contents ($ result_file );
1027
1027
$ stats ['output ' ] = $ output ? unserialize ($ output ) : '' ;
1028
1028
if (!$ stats ['output ' ]) {
1029
- $ stats ['output ' ] = array (
1030
- array (
1031
- 'file ' => $ file ,
1032
- 'tests ' => array (),
1033
- 'stats ' => array (
1034
- 'plan ' => null ,
1035
- 'total ' => 0 ,
1036
- 'failed ' => array (),
1037
- 'passed ' => array (),
1038
- 'skipped ' => array (),
1039
- 'errors ' => array (
1040
- array (
1041
- 'message ' => 'Missing test report. It is probably due to a Parse error. ' ,
1042
- )
1043
- ),
1044
- ),
1045
- ),
1046
- );
1029
+ $ stats ['output ' ] = $ this ->makeOutputForMissingTestReport ($ file );
1047
1030
}
1048
1031
unlink ($ result_file );
1049
1032
@@ -1154,6 +1137,28 @@ function lime_shutdown()
1154
1137
return $ this ->stats ['failed_files ' ] ? false : true ;
1155
1138
}
1156
1139
1140
+ private function makeOutputForMissingTestReport (string $ file ): array
1141
+ {
1142
+ return array (
1143
+ array (
1144
+ 'file ' => $ file ,
1145
+ 'tests ' => array (),
1146
+ 'stats ' => array (
1147
+ 'plan ' => null ,
1148
+ 'total ' => 0 ,
1149
+ 'failed ' => array (),
1150
+ 'passed ' => array (),
1151
+ 'skipped ' => array (),
1152
+ 'errors ' => array (
1153
+ array (
1154
+ 'message ' => 'Missing test report. It is probably due to a Parse error. ' ,
1155
+ )
1156
+ ),
1157
+ ),
1158
+ ),
1159
+ );
1160
+ }
1161
+
1157
1162
private function computePlanDeltaFromFileStats (array $ fileStats ): int
1158
1163
{
1159
1164
if ($ fileStats ['plan ' ]) {
You can’t perform that action at this time.
0 commit comments