blob: 00203bb4e5831861710b4f93d962e963a2f6f12f (
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
|
--TEST--
Function snmp_read_mib
--CREDITS--
Olivier Doucet Olivier Doucet Boris Lytochkin
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
require_once(__DIR__.'/snmp_include.inc');
if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the system');
?>
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
echo "Checking error handling\n";
var_dump(snmp_read_mib());
var_dump(snmp_read_mib(__DIR__.'/cannotfindthisfile'));
echo "Checking working\n";
var_dump(snmp_read_mib($mibdir . '/SNMPv2-MIB.txt'));
?>
--EXPECTF--
Checking error handling
Warning: snmp_read_mib() expects exactly 1 parameter, 0 given in %s on line %d
bool(false)
Warning: snmp_read_mib(): Error while reading MIB file '%s': No such file or directory in %s on line %d
bool(false)
Checking working
bool(true)
|