diff options
Diffstat (limited to 'tests/010-rpmvercmp_error7.phpt')
-rw-r--r-- | tests/010-rpmvercmp_error7.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/010-rpmvercmp_error7.phpt b/tests/010-rpmvercmp_error7.phpt new file mode 100644 index 0000000..98bfeb3 --- /dev/null +++ b/tests/010-rpmvercmp_error7.phpt @@ -0,0 +1,25 @@ +--TEST-- +Check for rpmvercmp function error +--SKIPIF-- +<?php +if (!extension_loaded("rpminfo")) print "skip"; +if (PHP_VERSION_ID >= 80000) print "skip only for PHP 7"; +?> +--FILE-- +<?php +var_dump(rpmvercmp()); +var_dump(rpmvercmp("a")); +var_dump(rpmvercmp("a", "b", "c")); +?> +Done +--EXPECTF-- + +Warning: rpmvercmp() expects exactly 2 parameters, 0 given in %s/002-rpmvercmp.php on line %d +NULL + +Warning: rpmvercmp() expects exactly 2 parameters, 1 given in %s/002-rpmvercmp.php on line %d +NULL + +Warning: rpmvercmp() expects exactly 2 parameters, 3 given in %s/002-rpmvercmp.php on line %d +NULL +Done |