Skip to content

Commit 5a4b9bc

Browse files
committed
More ZPP warning to error related test fixes
1 parent 752012a commit 5a4b9bc

File tree

4 files changed

+0
-35
lines changed

4 files changed

+0
-35
lines changed

ext/snmp/tests/snmp2_get.phpt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ snmp_set_quick_print(false);
1515
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
1616

1717
echo "Checking error handling\n";
18-
var_dump(snmp2_get($hostname, $community, '.1.3.6.1.2.1.1.1.0', ''));
19-
var_dump(snmp2_get($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout, ''));
2018
echo "Empty OID array\n";
2119
var_dump(snmp2_get($hostname, $community, array(), $timeout, $retries));
2220

@@ -48,12 +46,6 @@ var_dump(snmp2_get($hostname, $community, array('.1.3.6.1.2.1.1.1.0', '.1.3.6.1.
4846
?>
4947
--EXPECTF--
5048
Checking error handling
51-
52-
Warning: snmp2_get() expects parameter 4 to be int,%s given in %s on line %d
53-
bool(false)
54-
55-
Warning: snmp2_get() expects parameter 5 to be int,%s given in %s on line %d
56-
bool(false)
5749
Empty OID array
5850

5951
Warning: snmp2_get(): Got empty OID array in %s on line %d

ext/snmp/tests/snmp2_set.phpt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ snmp_set_quick_print(false);
1515
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
1616

1717
echo "Check error handing\n";
18-
echo "4args (5 needed)\n";
19-
$z = snmp2_set($hostname, $communityWrite, 'SNMPv2-MIB::sysLocation.0');
20-
var_dump($z);
21-
2218
echo "No type & no value (timeout & retries instead)\n";
2319
$z = snmp2_set($hostname, $communityWrite, 'SNMPv2-MIB::sysLocation.0', $timeout, $retries);
2420
var_dump($z);
@@ -142,10 +138,6 @@ var_dump((snmpget($hostname, $communityWrite, $oid2, $timeout, $retries) === $ol
142138
?>
143139
--EXPECTF--
144140
Check error handing
145-
4args (5 needed)
146-
147-
Warning: snmp2_set() expects at least 5 parameters, 3 given in %s on line %d
148-
bool(false)
149141
No type & no value (timeout & retries instead)
150142

151143
Warning: snmp2_set(): Bogus type '-1', should be single char, got 2 in %s on line %d

ext/snmp/tests/snmpget.phpt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ require_once(__DIR__.'/snmp_include.inc');
1414
snmp_set_quick_print(false);
1515
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
1616

17-
echo "Checking error handling\n";
18-
var_dump(snmpget($hostname, $community, '.1.3.6.1.2.1.1.1.0', ''));
19-
var_dump(snmpget($hostname, $community, '.1.3.6.1.2.1.1.1.0', $timeout, ''));
20-
2117
echo "Checking working\n";
2218
echo "Single OID, default timeout and retries\n";
2319
var_dump(snmpget($hostname, $community, '.1.3.6.1.2.1.1.1.0'));
@@ -49,13 +45,6 @@ var_dump(snmpget($hostname, $community, array('.1.3.6.1.2.1.1.1.0', '.1.3.6.1.2.
4945

5046
?>
5147
--EXPECTF--
52-
Checking error handling
53-
54-
Warning: snmpget() expects parameter 4 to be int,%s given in %s on line %d
55-
bool(false)
56-
57-
Warning: snmpget() expects parameter 5 to be int,%s given in %s on line %d
58-
bool(false)
5948
Checking working
6049
Single OID, default timeout and retries
6150
string(%d) "%s"

ext/snmp/tests/snmpset.phpt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ snmp_set_quick_print(false);
1515
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
1616

1717
echo "Check error handing\n";
18-
echo "4args (5 needed)\n";
19-
$z = snmpset($hostname, $communityWrite, 'SNMPv2-MIB::sysLocation.0');
20-
var_dump($z);
21-
2218
echo "No type & no value (timeout & retries instead)\n";
2319
$z = snmpset($hostname, $communityWrite, 'SNMPv2-MIB::sysLocation.0', $timeout, $retries);
2420
var_dump($z);
@@ -142,10 +138,6 @@ var_dump((snmpget($hostname, $communityWrite, $oid2, $timeout, $retries) === $ol
142138
?>
143139
--EXPECTF--
144140
Check error handing
145-
4args (5 needed)
146-
147-
Warning: snmpset() expects at least 5 parameters, 3 given in %s on line %d
148-
bool(false)
149141
No type & no value (timeout & retries instead)
150142

151143
Warning: snmpset(): Bogus type '-1', should be single char, got 2 in %s on line %d

0 commit comments

Comments
 (0)