diff options
author | Remi Collet <remi@remirepo.net> | 2021-06-18 15:38:04 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-06-18 15:38:04 +0200 |
commit | 0b1615d804c778516c8c9ed458b69d7a70aea5bb (patch) | |
tree | 45708027800c113a933652bc7af240cc3cab7150 /tests/012-rpmaddtag.phpt | |
parent | df9c1b8603b19d16247965f85b385004ce4a0335 (diff) |
raise exception on bad parameter value with PHP 8
and bump version to 0.6
Diffstat (limited to 'tests/012-rpmaddtag.phpt')
-rw-r--r-- | tests/012-rpmaddtag.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/012-rpmaddtag.phpt b/tests/012-rpmaddtag.phpt new file mode 100644 index 0000000..bf371a4 --- /dev/null +++ b/tests/012-rpmaddtag.phpt @@ -0,0 +1,16 @@ +--TEST-- +Check for rpmaddtag parameter check +--SKIPIF-- +<?php if (!extension_loaded("rpminfo")) print "skip"; ?> +--FILE-- +<?php +var_dump(rpmaddtag(RPMTAG_INSTALLTIME)); +try { + var_dump(rpmaddtag(-1)); +} catch (ValueError $e) { + echo $e->getMessage(); +} +?> +--EXPECTF-- +bool(true) +%A Unkown rpmtag%A |