summaryrefslogtreecommitdiffstats
path: root/tests/007-rpmdbinfo.phpt
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-02-08 13:24:38 +0100
committerRemi Collet <remi@remirepo.net>2018-02-08 13:24:38 +0100
commitb412ee5342b1ed43278ef87d75dfd9701a6fba7c (patch)
tree9c697ec32d9c96d5e64675c580662add9bf7e8bd /tests/007-rpmdbinfo.phpt
parent759a0b1cd5880d3571a2c0c9f57a28db903b341a (diff)
new function: array rpmdbinfo(string name [, bool full]);
Diffstat (limited to 'tests/007-rpmdbinfo.phpt')
-rw-r--r--tests/007-rpmdbinfo.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/007-rpmdbinfo.phpt b/tests/007-rpmdbinfo.phpt
new file mode 100644
index 0000000..6ef5aa1
--- /dev/null
+++ b/tests/007-rpmdbinfo.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Check for rpmdbinfo function
+--SKIPIF--
+<?php if (!extension_loaded("rpminfo")) print "skip"; ?>
+--FILE--
+<?php
+var_dump(rpmdbinfo('doesntexistsinrpmdb'));
+var_dump(rpmdbinfo('bash'));
+?>
+Done
+--EXPECTF--
+bool(false)
+array(1) {
+ [0]=>
+ array(4) {
+ ["Name"]=>
+ string(4) "bash"
+ ["Version"]=>
+ string(%d) "%s"
+ ["Release"]=>
+ string(%d) "%s"
+ ["Arch"]=>
+ string(%d) "%s"
+ }
+}
+Done