Annotation of embedaddon/php/ext/snmp/tests/snmp2_getnext.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Function snmp2_getnext
! 3: --CREDITS--
! 4: Olivier Doucet & Boris Lytochkin
! 5: --SKIPIF--
! 6: <?php
! 7: require_once(dirname(__FILE__).'/skipif.inc');
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: require_once(dirname(__FILE__).'/snmp_include.inc');
! 12:
! 13: //EXPECTF format is quickprint OFF
! 14: snmp_set_quick_print(false);
! 15: snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
! 16:
! 17: echo "Single OID\n";
! 18: var_dump(snmp2_getnext($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout, $retries));
! 19: echo "Single OID in array\n";
! 20: var_dump(snmp2_getnext($hostname, $community, array('.1.3.6.1.2.1.1.1.0'), $timeout, $retries));
! 21: echo "Multiple OID\n";
! 22: var_dump(snmp2_getnext($hostname, $community, array('.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.1.1.6.0'), $timeout, $retries));
! 23:
! 24: ?>
! 25: --EXPECTF--
! 26: Single OID
! 27: %unicode|string%(%d) "%s"
! 28: Single OID in array
! 29: array(1) {
! 30: ["%s"]=>
! 31: %unicode|string%(%d) "%s"
! 32: }
! 33: Multiple OID
! 34: array(2) {
! 35: ["%s"]=>
! 36: %unicode|string%(%d) "%s"
! 37: ["%s"]=>
! 38: %unicode|string%(%d) "%d"
! 39: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>