diff options
author | Remi Collet <remi@remirepo.net> | 2023-09-11 10:21:36 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-09-11 10:21:36 +0200 |
commit | 64504e8b8fb097d6e849953eb0e4721321c41a27 (patch) | |
tree | 6d993631f655de280efa8b6db1c664f0294ae39b /tests/011-rpmvercmp_error8.phpt | |
parent | 1662502e7dc10dcd4f17eb304486e2058cbb1d5a (diff) |
add optional operator to rpmcmpver for consistency with version_compare
Diffstat (limited to 'tests/011-rpmvercmp_error8.phpt')
-rw-r--r-- | tests/011-rpmvercmp_error8.phpt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/011-rpmvercmp_error8.phpt b/tests/011-rpmvercmp_error8.phpt index 4430975..2fe6aa1 100644 --- a/tests/011-rpmvercmp_error8.phpt +++ b/tests/011-rpmvercmp_error8.phpt @@ -19,13 +19,19 @@ try { } try { var_dump(rpmvercmp("a", "b", "c")); +} catch (ValueError $e) { + echo $e->getMessage(), "\n"; +} +try { + var_dump(rpmvercmp("a", "b", "c", "d")); } catch (ArgumentCountError $e) { echo $e->getMessage(), "\n"; } ?> Done --EXPECTF-- -rpmvercmp() expects exactly 2 %s, 0 given -rpmvercmp() expects exactly 2 %s, 1 given -rpmvercmp() expects exactly 2 %s, 3 given +rpmvercmp() expects at least 2 %s, 0 given +rpmvercmp() expects at least 2 %s, 1 given +rpmvercmp(): Argument #3 ($operator) must be a valid comparison operator +rpmvercmp() expects at most 3 %s, 4 given Done |