From e55522838e685d6bbf656d511a2c180b0745cc7f Mon Sep 17 00:00:00 2001 From: Boris Lytochkin Date: Sat, 20 Aug 2011 14:50:49 +0000 Subject: [PATCH] more code coverage --- ext/snmp/tests/generic_timeout_error.phpt | 5 +++++ ext/snmp/tests/snmp-object-errno-errstr.phpt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ext/snmp/tests/generic_timeout_error.phpt b/ext/snmp/tests/generic_timeout_error.phpt index 0f5101a4397..c333a0d20b1 100644 --- a/ext/snmp/tests/generic_timeout_error.phpt +++ b/ext/snmp/tests/generic_timeout_error.phpt @@ -15,8 +15,13 @@ snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_PLAIN); var_dump(snmpget($hostname, 'timeout_community_432', '.1.3.6.1.2.1.1.1.0', $timeout, $retries)); +var_dump(snmpget($hostname, 'timeout_community_432', array('.1.3.6.1.2.1.1.1.0'), $timeout, $retries)); ?> --EXPECTF-- Warning: snmpget(): No response from %s in %s on line %d bool(false) + +Warning: snmpget(): No response from %s in %s on line %d +bool(false) + diff --git a/ext/snmp/tests/snmp-object-errno-errstr.phpt b/ext/snmp/tests/snmp-object-errno-errstr.phpt index 923fb856e07..427a754b083 100644 --- a/ext/snmp/tests/snmp-object-errno-errstr.phpt +++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt @@ -42,6 +42,7 @@ $session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass); var_dump(@$session->get('.1.3.6.1.2.1.1.1.0')); var_dump($session->getErrno() == SNMP::ERRNO_GENERIC); var_dump($session->getError()); +var_dump(@$session->get(array('.1.3.6.1.2.1.1.1.0'))); $session->close(); ?> --EXPECTF-- @@ -61,3 +62,4 @@ SNMP::ERRNO_GENERIC bool(false) bool(true) %string|unicode%(%d) "Fatal error: Unknown user name" +bool(false)