projects/aports·blob master · refs

39 lines · 918 B

1Patch-Source: https://github.com/sqmk/pecl-jsmin/pull/60
2
3diff --git a/tests/missing-argument.phpt b/tests/missing-argument.phpt
4index 57d0925..826038b 100644
5--- a/tests/missing-argument.phpt
6+++ b/tests/missing-argument.phpt
7@@ -1,5 +1,9 @@
8 --TEST--
9 Missing argument throws warning
10+--SKIPIF--
11+<?php
12+if (PHP_VERSION_ID >= 80000) die('skip Only for PHP < 8.0');
13+?>
14 --FILE--
15 <?php
16
17diff --git a/tests/missing-argument8.phpt b/tests/missing-argument8.phpt
18new file mode 100644
19index 0000000..4638dc2
20--- /dev/null
21+++ b/tests/missing-argument8.phpt
22@@ -0,0 +1,17 @@
23+--TEST--
24+Missing argument throws fatal error
25+--SKIPIF--
26+<?php
27+if (PHP_VERSION_ID < 80000) die('skip Only for PHP >= 8.0');
28+?>
29+--FILE--
30+<?php
31+
32+echo jsmin();
33+
34+--EXPECTF--
35+Fatal error: Uncaught ArgumentCountError: jsmin() expects at least 1 argument, 0 given in %s
36+Stack trace:
37+#0 %s(3): jsmin()
38+#1 {main}
39+ thrown in %s on line 3