more code coverage

This commit is contained in:
Boris Lytochkin 2011-08-20 14:50:49 +00:00
parent dcf0dfb9ab
commit e55522838e
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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)