File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 15
15
16
16
// Suppress unexpected errors from output and exit early as a failure when encountered.
17
17
set_error_handler (function ($ errno , $ errstr , $ errfile , $ errline ) {
18
+ echo 'Error triggered: ' . $ errstr . PHP_EOL ;
18
19
exit (1 );
19
20
});
20
21
34
35
35
36
$ Autoloader = __DIR__ . DIRECTORY_SEPARATOR . 'vendor ' . DIRECTORY_SEPARATOR . 'autoload.php ' ;
36
37
if (!is_readable ($ Autoloader )) {
38
+ echo 'Autoloader is not readable. ' . PHP_EOL ;
37
39
exit (2 );
38
40
}
39
41
require $ Autoloader ;
49
51
unset($ ZipObj );
50
52
$ SigPath = $ TestsPath . 'signatures ' ;
51
53
} else {
54
+ echo 'Problem encountered trying to open signatures.zip. ' . PHP_EOL ;
52
55
exit (3 );
53
56
}
54
57
55
58
$ Samples = $ TestsPath . 'samples ' ;
56
59
57
60
$ Config = $ TestsPath . 'phpmussel.yml ' ;
58
61
if (!is_readable ($ Config ) || !is_readable ($ Samples ) || !is_readable ($ SigPath )) {
62
+ echo 'Configuration, samples, or signatures are not readable. ' . PHP_EOL ;
59
63
exit (4 );
60
64
}
61
65
85
89
$ Actual = $ Scanner ->scan ($ Samples , 3 );
86
90
ksort ($ Actual );
87
91
if ($ Actual !== $ Expected ) {
92
+ echo 'Actual scan results does not match expected scan results. ' . PHP_EOL ;
88
93
exit (5 );
89
94
}
90
95
91
96
restore_error_handler ();
92
97
93
- // All tests passed.
98
+ echo ' All tests passed. ' . PHP_EOL ;
94
99
exit (0 );
You can’t perform that action at this time.
0 commit comments