blob: 5d205d79244dd7d3484222d8b616979a467e7a43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
--TEST--
Check for rpminfo function errors
--SKIPIF--
<?php if (!extension_loaded("rpminfo")) print "skip"; ?>
--FILE--
<?php
echo "+ PHP Warnings\n";
var_dump(rpminfo(__DIR__ . "/missing.rpm"));
var_dump(rpminfo(__FILE__));
echo "\n+ PHP Warnings\n";
var_dump(rpminfo(__DIR__ . "/missing.rpm", true, $error),
$error);
var_dump(rpminfo(__FILE__, false, $error),
$error);
var_dump(is_array(rpminfo(__DIR__ . "/bidon.rpm", false, $error)),
$error);
?>
Done
--EXPECTF--
+ PHP Warnings
Warning: rpminfo(): Can't open '%s/tests/missing.rpm': No such file or directory in %s on line %d
NULL
Warning: rpminfo(): Can't read '%s/tests/006-rpminfo-errors.php': Argument is not a RPM file in %s on line %d
NULL
+ PHP Warnings
NULL
string(%d) "Can't open '%s/tests/missing.rpm': No such file or directory"
NULL
string(%d) "Can't read '%s/tests/006-rpminfo-errors.php': Argument is not a RPM file"
bool(true)
NULL
Done
|