diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt index 4e6bd04ea69..299a76350d9 100644 --- a/ext/snmp/tests/snmp-object-error.phpt +++ b/ext/snmp/tests/snmp-object-error.phpt @@ -57,17 +57,11 @@ $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries $session->valueretrieval = 67; var_dump($session->valueretrieval); echo "Closing session\n"; -var_dump($session->close('')); var_dump($session->close()); var_dump($session->get('.1.3.6.1.2.1.1.1.0')); var_dump($session->close()); $session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries); -var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, '')); -var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, 30, '')); -var_dump($session->get()); -var_dump($session->getnext()); -var_dump($session->set()); var_dump($session->max_oids); $session->max_oids = "ttt"; @@ -91,29 +85,11 @@ Open normal session Warning: main(): Unknown SNMP value retrieval method '67' in %s on line %d int(%d) Closing session - -Warning: SNMP::close() expects exactly 0 parameters, 1 given in %s on line %d -bool(false) bool(true) Warning: SNMP::get(): Invalid or uninitialized SNMP object in %s on line %d bool(false) bool(true) - -Warning: SNMP::walk() expects parameter 3 to be int, string given in %s on line %d -bool(false) - -Warning: SNMP::walk() expects parameter 4 to be int, string given in %s on line %d -bool(false) - -Warning: SNMP::get() expects at least 1 parameter, 0 given in %s on line %d -bool(false) - -Warning: SNMP::getnext() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - -Warning: SNMP::set() expects exactly 3 parameters, 0 given in %s on line %d -bool(false) NULL Warning: main(): max_oids should be positive integer or NULL, got 0 in %s on line %d diff --git a/ext/snmp/tests/snmp-object-setSecurity_error.phpt b/ext/snmp/tests/snmp-object-setSecurity_error.phpt index f43e699a31d..819642d9572 100644 --- a/ext/snmp/tests/snmp-object-setSecurity_error.phpt +++ b/ext/snmp/tests/snmp-object-setSecurity_error.phpt @@ -18,7 +18,6 @@ $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries $session->setSecurity('noAuthNoPriv'); #echo "Checking error handling\n"; -var_dump($session->setSecurity()); var_dump($session->setSecurity('')); var_dump($session->setSecurity('bugusPriv')); var_dump($session->setSecurity('authNoPriv', 'TTT')); @@ -33,9 +32,6 @@ var_dump($session->close()); ?> --EXPECTF-- -Warning: SNMP::setSecurity() expects at least 1 parameter, 0 given in %s on line %d -bool(false) - Warning: SNMP::setSecurity(): Invalid security level '' in %s on line %d bool(false) diff --git a/ext/snmp/tests/snmp2_real_walk.phpt b/ext/snmp/tests/snmp2_real_walk.phpt index 5a66312ebd8..d98c2c4c049 100644 --- a/ext/snmp/tests/snmp2_real_walk.phpt +++ b/ext/snmp/tests/snmp2_real_walk.phpt @@ -14,10 +14,6 @@ require_once(__DIR__.'/snmp_include.inc'); snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_PLAIN); -echo "Checking error handling\n"; -var_dump(snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', '')); -var_dump(snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, '')); - echo "Checking working\n"; echo "Single OID\n"; $return = snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries); @@ -50,13 +46,6 @@ var_dump($return); ?> --EXPECTF-- -Checking error handling - -Warning: snmp2_real_walk() expects parameter 4 to be int, %s given in %s on line %d -bool(false) - -Warning: snmp2_real_walk() expects parameter 5 to be int, %s given in %s on line %d -bool(false) Checking working Single OID string(5) "array" diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt index ccccf76dc84..326e0a71cd3 100644 --- a/ext/snmp/tests/snmp2_walk.phpt +++ b/ext/snmp/tests/snmp2_walk.phpt @@ -14,10 +14,6 @@ require_once(__DIR__.'/snmp_include.inc'); snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_PLAIN); -echo "Checking error handling\n"; -var_dump(snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', '')); -var_dump(snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, '')); - echo "Checking working\n"; echo "Single OID\n"; $return = snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries); @@ -58,13 +54,6 @@ var_dump($return); ?> --EXPECTF-- -Checking error handling - -Warning: snmp2_walk() expects parameter 4 to be int, %s given in %s on line %d -bool(false) - -Warning: snmp2_walk() expects parameter 5 to be int, %s given in %s on line %d -bool(false) Checking working Single OID string(5) "array" diff --git a/ext/snmp/tests/snmp3-error.phpt b/ext/snmp/tests/snmp3-error.phpt index 58e02dc7c53..cbebf69f628 100644 --- a/ext/snmp/tests/snmp3-error.phpt +++ b/ext/snmp/tests/snmp3-error.phpt @@ -16,7 +16,6 @@ echo "Checking error handling\n"; // string auth_passphrase, string priv_protocol, string priv_passphrase, // string object_id [, int timeout [, int retries]]); -var_dump(snmp3_get($hostname, $community, '', '', '', '', '')); var_dump(snmp3_get($hostname, $community, '', '', '', '', '', '.1.3.6.1.2.1.1.1.0')); var_dump(snmp3_get($hostname, $community, 'bugusPriv', '', '', '', '', '.1.3.6.1.2.1.1.1.0')); var_dump(snmp3_get($hostname, $community, 'authNoPriv', 'TTT', '', '', '', '.1.3.6.1.2.1.1.1.0')); @@ -27,8 +26,6 @@ var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', 'ty', '.1.3.6.1.2.1.1.1.0')); var_dump(snmp3_get($hostname, 'somebogususer', 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.1.2.1.1.1.0', $timeout, $retries)); -var_dump(snmp3_set($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '', 's')); - var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.777...7.5.3', 's', 'ttt', $timeout, $retries)); var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.777.7.5.3', array('s'), 'yyy', $timeout, $retries)); @@ -36,9 +33,6 @@ var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $pr --EXPECTF-- Checking error handling -Warning: snmp3_get() expects at least 8 parameters, 7 given in %s on line %d -bool(false) - Warning: snmp3_get(): Invalid security level '' in %s on line %d bool(false) @@ -66,9 +60,6 @@ bool(false) Warning: snmp3_get(): Fatal error: Unknown user name in %s on line %d bool(false) -Warning: snmp3_set() expects at least 10 parameters, 9 given in %s on line %d -bool(false) - Warning: snmp3_set(): Invalid object identifier: .1.3.6.777...7.5.3 in %s on line %d bool(false) diff --git a/ext/snmp/tests/snmp_get_quick_print.phpt b/ext/snmp/tests/snmp_get_quick_print.phpt index 630f7b544a0..bce2aca4619 100644 --- a/ext/snmp/tests/snmp_get_quick_print.phpt +++ b/ext/snmp/tests/snmp_get_quick_print.phpt @@ -10,11 +10,6 @@ require_once(__DIR__.'/skipif.inc'); --EXPECTF-- -Checking error handling - -Warning: snmp_get_quick_print() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: snmp_set_quick_print() expects parameter 1 to be int, %s given in %s on line %d -bool(false) - -Warning: snmp_set_quick_print() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) Checking working bool(%s) bool(false) diff --git a/ext/snmp/tests/snmp_get_valueretrieval.phpt b/ext/snmp/tests/snmp_get_valueretrieval.phpt index ca07ecaa55f..5d2242c1cd6 100644 --- a/ext/snmp/tests/snmp_get_valueretrieval.phpt +++ b/ext/snmp/tests/snmp_get_valueretrieval.phpt @@ -11,9 +11,6 @@ require_once(__DIR__.'/skipif.inc'); require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; -var_dump(snmp_get_valueretrieval('noarg')); -var_dump(snmp_set_valueretrieval()); -var_dump(snmp_set_valueretrieval('noarg')); var_dump(snmp_set_valueretrieval(67)); echo "Checking working\n"; @@ -33,15 +30,6 @@ var_dump(snmp_get_valueretrieval() === (SNMP_VALUE_LIBRARY|SNMP_VALUE_OBJECT)); --EXPECTF-- Checking error handling -Warning: snmp_get_valueretrieval() expects exactly 0 parameters, 1 given in %s on line %d -bool(false) - -Warning: snmp_set_valueretrieval() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - -Warning: snmp_set_valueretrieval() expects parameter 1 to be int, %s given in %s on line %d -bool(false) - Warning: snmp_set_valueretrieval(): Unknown SNMP value retrieval method '67' in %s on line %d bool(false) Checking working diff --git a/ext/snmp/tests/snmp_read_mib.phpt b/ext/snmp/tests/snmp_read_mib.phpt index 00203bb4e58..65ce16d2099 100644 --- a/ext/snmp/tests/snmp_read_mib.phpt +++ b/ext/snmp/tests/snmp_read_mib.phpt @@ -15,7 +15,6 @@ if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the sys 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"; @@ -25,9 +24,6 @@ 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 diff --git a/ext/snmp/tests/snmp_set_enum_print.phpt b/ext/snmp/tests/snmp_set_enum_print.phpt index 1efe8953ea4..e17c6c80a22 100644 --- a/ext/snmp/tests/snmp_set_enum_print.phpt +++ b/ext/snmp/tests/snmp_set_enum_print.phpt @@ -11,18 +11,11 @@ if (!function_exists('snmp_set_enum_print')) die('This function is only availabl --EXPECTF-- -Checking error handling - -Warning: snmp_set_enum_print() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) Checking working bool(true) bool(true) diff --git a/ext/snmp/tests/snmp_set_oid_output_format.phpt b/ext/snmp/tests/snmp_set_oid_output_format.phpt index 30778dea9f3..65cb79b7b43 100644 --- a/ext/snmp/tests/snmp_set_oid_output_format.phpt +++ b/ext/snmp/tests/snmp_set_oid_output_format.phpt @@ -12,7 +12,6 @@ if (!function_exists('snmp_set_oid_output_format')) die('This function is only a require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; -var_dump(snmp_set_oid_output_format()); var_dump(snmp_set_oid_output_format(123)); echo "Checking working\n"; @@ -22,9 +21,6 @@ var_dump(snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC)); --EXPECTF-- Checking error handling -Warning: snmp_set_oid_output_format() expects exactly 1 parameter, 0 given in %s on line %d -bool(false) - Warning: snmp_set_oid_output_format(): Unknown SNMP output print format '123' in %s on line %d bool(false) Checking working diff --git a/ext/snmp/tests/snmprealwalk.phpt b/ext/snmp/tests/snmprealwalk.phpt index ba5a304240d..b3e75764660 100644 --- a/ext/snmp/tests/snmprealwalk.phpt +++ b/ext/snmp/tests/snmprealwalk.phpt @@ -14,10 +14,6 @@ require_once(__DIR__.'/snmp_include.inc'); snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_PLAIN); -echo "Checking error handling\n"; -var_dump(snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', '')); -var_dump(snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, '')); - echo "Checking working\n"; echo "Single OID\n"; $return = snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries); @@ -50,13 +46,6 @@ var_dump($return); ?> --EXPECTF-- -Checking error handling - -Warning: snmprealwalk() expects parameter 4 to be int, %s given in %s on line %d -bool(false) - -Warning: snmprealwalk() expects parameter 5 to be int, %s given in %s on line %d -bool(false) Checking working Single OID string(5) "array" diff --git a/ext/snmp/tests/snmpwalk.phpt b/ext/snmp/tests/snmpwalk.phpt index 1cdfc6d1e5a..b7ed803fd38 100644 --- a/ext/snmp/tests/snmpwalk.phpt +++ b/ext/snmp/tests/snmpwalk.phpt @@ -14,10 +14,6 @@ require_once(__DIR__.'/snmp_include.inc'); snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_PLAIN); -echo "Checking error handling\n"; -var_dump(snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', '')); -var_dump(snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, '')); - echo "Checking working\n"; echo "Single OID\n"; $return = snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries); @@ -58,13 +54,6 @@ var_dump($return); ?> --EXPECTF-- -Checking error handling - -Warning: snmpwalk() expects parameter 4 to be int, %s given in %s on line %d -bool(false) - -Warning: snmpwalk() expects parameter 5 to be int, %s given in %s on line %d -bool(false) Checking working Single OID string(5) "array"