summaryrefslogtreecommitdiffstats
path: root/tests/013-rpmdbsearch-error.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/013-rpmdbsearch-error.phpt')
-rw-r--r--tests/013-rpmdbsearch-error.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/013-rpmdbsearch-error.phpt b/tests/013-rpmdbsearch-error.phpt
new file mode 100644
index 0000000..4a61227
--- /dev/null
+++ b/tests/013-rpmdbsearch-error.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Check for rpmdbinfo function
+--SKIPIF--
+<?php if (!extension_loaded("rpminfo")) print "skip"; ?>
+--FILE--
+<?php
+var_dump(rpmdbsearch('notexists', RPMTAG_NAME));
+try {
+var_dump(rpmdbsearch('notexists', RPMTAG_NAME, 99));
+} catch (ValueError $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECTF--
+NULL
+%A Unkown rpmmire%A