Skip to content

Commit af179c6

Browse files
committed
Improve test script
1 parent ee282ef commit af179c6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tests/test.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@
55
error_reporting(E_ALL);
66

77
$code = file_get_contents(__DIR__ . '/assets/admin.php');
8-
$code = \Ganlv\EnphpDecoder\AutoDecoder::decode($code);
8+
try {
9+
$code = \Ganlv\EnphpDecoder\AutoDecoder::decode($code);
10+
echo $code;
11+
} catch (Exception $e) {
12+
echo $e->getTraceAsString();
13+
exit(1);
14+
}
915

1016
$code = file_get_contents(__DIR__ . '/assets/index.php');
11-
$code = \Ganlv\EnphpDecoder\AutoDecoder::decode($code);
17+
try {
18+
$code = \Ganlv\EnphpDecoder\AutoDecoder::decode($code);
19+
echo $code;
20+
} catch (Exception $e) {
21+
echo $e->getTraceAsString();
22+
exit(2);
23+
}

0 commit comments

Comments
 (0)