Annotation of embedaddon/php/ext/snmp/tests/snmp_read_mib.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--                                 
                      2: Function snmp_read_mib
                      3: --CREDITS--
                      4: Olivier Doucet Olivier Doucet Boris Lytochkin
                      5: --SKIPIF--
                      6: <?php
                      7: require_once(dirname(__FILE__).'/skipif.inc');
                      8: require_once(dirname(__FILE__).'/snmp_include.inc');
                      9: 
                     10: if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('MIB file not in the system');
                     11: 
                     12: ?>
                     13: --FILE--
                     14: <?php
                     15: require_once(dirname(__FILE__).'/snmp_include.inc');
                     16: 
                     17: echo "Checking error handling\n";
                     18: var_dump(snmp_read_mib());
                     19: var_dump(snmp_read_mib(dirname(__FILE__).'/cannotfindthisfile'));
                     20: 
                     21: echo "Checking working\n";
                     22: var_dump(snmp_read_mib($mibdir . '/SNMPv2-MIB.txt'));
                     23: 
                     24: ?>
                     25: --EXPECTF--
                     26: Checking error handling
                     27: 
                     28: Warning: snmp_read_mib() expects exactly 1 parameter, 0 given in %s on line %d
                     29: bool(false)
                     30: 
                     31: Warning: snmp_read_mib(): Error while reading MIB file '%s': No such file or directory in %s on line %d
                     32: bool(false)
                     33: Checking working
                     34: bool(true)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>