diff options
Diffstat (limited to 'tests/009-rpmdbinfo2.phpt')
-rw-r--r-- | tests/009-rpmdbinfo2.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/009-rpmdbinfo2.phpt b/tests/009-rpmdbinfo2.phpt new file mode 100644 index 0000000..23f95c5 --- /dev/null +++ b/tests/009-rpmdbinfo2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Check for rpmdbinfo function on NEVR +--SKIPIF-- +<?php +if (!extension_loaded("rpminfo")) print "skip"; +if (!rpmdbinfo('kernel')) print "skip kernel not installed"; +?> +--FILE-- +<?php +$k = rpmdbinfo('kernel'); +var_dump(count($k) > 0); // multiple kernels +$n = $k[0]['Name'] . '-' . $k[0]['Version'] . '-' . $k[0]['Release']; + +$k = rpmdbinfo($n); // single kernel with NEVR +var_dump(count($k) ==1); + +?> +Done +--EXPECTF-- +bool(true) +bool(true) +Done |