Skip to content

Commit 752012a

Browse files
committed
Fix tests wrt. ZPP warnings to errors
Since these test parts are solely about checking ZPP, we drop them altogether.
1 parent f8ae8e9 commit 752012a

12 files changed

+0
-123
lines changed

ext/snmp/tests/snmp-object-error.phpt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,11 @@ $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries
5757
$session->valueretrieval = 67;
5858
var_dump($session->valueretrieval);
5959
echo "Closing session\n";
60-
var_dump($session->close(''));
6160
var_dump($session->close());
6261
var_dump($session->get('.1.3.6.1.2.1.1.1.0'));
6362
var_dump($session->close());
6463

6564
$session = new SNMP(SNMP::VERSION_2c, $hostname, $community, $timeout, $retries);
66-
var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, ''));
67-
var_dump($session->walk('.1.3.6.1.2.1.1', FALSE, 30, ''));
68-
var_dump($session->get());
69-
var_dump($session->getnext());
70-
var_dump($session->set());
7165

7266
var_dump($session->max_oids);
7367
$session->max_oids = "ttt";
@@ -91,29 +85,11 @@ Open normal session
9185
Warning: main(): Unknown SNMP value retrieval method '67' in %s on line %d
9286
int(%d)
9387
Closing session
94-
95-
Warning: SNMP::close() expects exactly 0 parameters, 1 given in %s on line %d
96-
bool(false)
9788
bool(true)
9889

9990
Warning: SNMP::get(): Invalid or uninitialized SNMP object in %s on line %d
10091
bool(false)
10192
bool(true)
102-
103-
Warning: SNMP::walk() expects parameter 3 to be int, string given in %s on line %d
104-
bool(false)
105-
106-
Warning: SNMP::walk() expects parameter 4 to be int, string given in %s on line %d
107-
bool(false)
108-
109-
Warning: SNMP::get() expects at least 1 parameter, 0 given in %s on line %d
110-
bool(false)
111-
112-
Warning: SNMP::getnext() expects exactly 1 parameter, 0 given in %s on line %d
113-
bool(false)
114-
115-
Warning: SNMP::set() expects exactly 3 parameters, 0 given in %s on line %d
116-
bool(false)
11793
NULL
11894

11995
Warning: main(): max_oids should be positive integer or NULL, got 0 in %s on line %d

ext/snmp/tests/snmp-object-setSecurity_error.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ $session = new SNMP(SNMP::VERSION_3, $hostname, $user_noauth, $timeout, $retries
1818
$session->setSecurity('noAuthNoPriv');
1919

2020
#echo "Checking error handling\n";
21-
var_dump($session->setSecurity());
2221
var_dump($session->setSecurity(''));
2322
var_dump($session->setSecurity('bugusPriv'));
2423
var_dump($session->setSecurity('authNoPriv', 'TTT'));
@@ -33,9 +32,6 @@ var_dump($session->close());
3332

3433
?>
3534
--EXPECTF--
36-
Warning: SNMP::setSecurity() expects at least 1 parameter, 0 given in %s on line %d
37-
bool(false)
38-
3935
Warning: SNMP::setSecurity(): Invalid security level '' in %s on line %d
4036
bool(false)
4137

ext/snmp/tests/snmp2_real_walk.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(snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', ''));
19-
var_dump(snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, ''));
20-
2117
echo "Checking working\n";
2218
echo "Single OID\n";
2319
$return = snmp2_real_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries);
@@ -50,13 +46,6 @@ var_dump($return);
5046

5147
?>
5248
--EXPECTF--
53-
Checking error handling
54-
55-
Warning: snmp2_real_walk() expects parameter 4 to be int, %s given in %s on line %d
56-
bool(false)
57-
58-
Warning: snmp2_real_walk() expects parameter 5 to be int, %s given in %s on line %d
59-
bool(false)
6049
Checking working
6150
Single OID
6251
string(5) "array"

ext/snmp/tests/snmp2_walk.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(snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', ''));
19-
var_dump(snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, ''));
20-
2117
echo "Checking working\n";
2218
echo "Single OID\n";
2319
$return = snmp2_walk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries);
@@ -58,13 +54,6 @@ var_dump($return);
5854

5955
?>
6056
--EXPECTF--
61-
Checking error handling
62-
63-
Warning: snmp2_walk() expects parameter 4 to be int, %s given in %s on line %d
64-
bool(false)
65-
66-
Warning: snmp2_walk() expects parameter 5 to be int, %s given in %s on line %d
67-
bool(false)
6857
Checking working
6958
Single OID
7059
string(5) "array"

ext/snmp/tests/snmp3-error.phpt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ echo "Checking error handling\n";
1616
// string auth_passphrase, string priv_protocol, string priv_passphrase,
1717
// string object_id [, int timeout [, int retries]]);
1818

19-
var_dump(snmp3_get($hostname, $community, '', '', '', '', ''));
2019
var_dump(snmp3_get($hostname, $community, '', '', '', '', '', '.1.3.6.1.2.1.1.1.0'));
2120
var_dump(snmp3_get($hostname, $community, 'bugusPriv', '', '', '', '', '.1.3.6.1.2.1.1.1.0'));
2221
var_dump(snmp3_get($hostname, $community, 'authNoPriv', 'TTT', '', '', '', '.1.3.6.1.2.1.1.1.0'));
@@ -27,18 +26,13 @@ var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES',
2726
var_dump(snmp3_get($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', 'ty', '.1.3.6.1.2.1.1.1.0'));
2827
var_dump(snmp3_get($hostname, 'somebogususer', 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.1.2.1.1.1.0', $timeout, $retries));
2928

30-
var_dump(snmp3_set($hostname, $community, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '', 's'));
31-
3229
var_dump(snmp3_set($hostname, $rwuser, 'authPriv', 'MD5', $auth_pass, 'AES', $priv_pass, '.1.3.6.777...7.5.3', 's', 'ttt', $timeout, $retries));
3330
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));
3431

3532
?>
3633
--EXPECTF--
3734
Checking error handling
3835

39-
Warning: snmp3_get() expects at least 8 parameters, 7 given in %s on line %d
40-
bool(false)
41-
4236
Warning: snmp3_get(): Invalid security level '' in %s on line %d
4337
bool(false)
4438

@@ -66,9 +60,6 @@ bool(false)
6660
Warning: snmp3_get(): Fatal error: Unknown user name in %s on line %d
6761
bool(false)
6862

69-
Warning: snmp3_set() expects at least 10 parameters, 9 given in %s on line %d
70-
bool(false)
71-
7263
Warning: snmp3_set(): Invalid object identifier: .1.3.6.777...7.5.3 in %s on line %d
7364
bool(false)
7465

ext/snmp/tests/snmp_get_quick_print.phpt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ require_once(__DIR__.'/skipif.inc');
1010
<?php
1111
require_once(__DIR__.'/snmp_include.inc');
1212

13-
echo "Checking error handling\n";
14-
var_dump(snmp_get_quick_print('noarg'));
15-
var_dump(snmp_set_quick_print('noarg'));
16-
var_dump(snmp_set_quick_print());
17-
1813
echo "Checking working\n";
1914
var_dump(snmp_get_quick_print());
2015
snmp_set_quick_print(false);
@@ -24,16 +19,6 @@ var_dump(snmp_get_quick_print());
2419

2520
?>
2621
--EXPECTF--
27-
Checking error handling
28-
29-
Warning: snmp_get_quick_print() expects exactly 0 parameters, 1 given in %s on line %d
30-
NULL
31-
32-
Warning: snmp_set_quick_print() expects parameter 1 to be int, %s given in %s on line %d
33-
bool(false)
34-
35-
Warning: snmp_set_quick_print() expects exactly 1 parameter, 0 given in %s on line %d
36-
bool(false)
3722
Checking working
3823
bool(%s)
3924
bool(false)

ext/snmp/tests/snmp_get_valueretrieval.phpt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ require_once(__DIR__.'/skipif.inc');
1111
require_once(__DIR__.'/snmp_include.inc');
1212

1313
echo "Checking error handling\n";
14-
var_dump(snmp_get_valueretrieval('noarg'));
15-
var_dump(snmp_set_valueretrieval());
16-
var_dump(snmp_set_valueretrieval('noarg'));
1714
var_dump(snmp_set_valueretrieval(67));
1815

1916
echo "Checking working\n";
@@ -33,15 +30,6 @@ var_dump(snmp_get_valueretrieval() === (SNMP_VALUE_LIBRARY|SNMP_VALUE_OBJECT));
3330
--EXPECTF--
3431
Checking error handling
3532

36-
Warning: snmp_get_valueretrieval() expects exactly 0 parameters, 1 given in %s on line %d
37-
bool(false)
38-
39-
Warning: snmp_set_valueretrieval() expects exactly 1 parameter, 0 given in %s on line %d
40-
bool(false)
41-
42-
Warning: snmp_set_valueretrieval() expects parameter 1 to be int, %s given in %s on line %d
43-
bool(false)
44-
4533
Warning: snmp_set_valueretrieval(): Unknown SNMP value retrieval method '67' in %s on line %d
4634
bool(false)
4735
Checking working

ext/snmp/tests/snmp_read_mib.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the sys
1515
require_once(__DIR__.'/snmp_include.inc');
1616

1717
echo "Checking error handling\n";
18-
var_dump(snmp_read_mib());
1918
var_dump(snmp_read_mib(__DIR__.'/cannotfindthisfile'));
2019

2120
echo "Checking working\n";
@@ -25,9 +24,6 @@ var_dump(snmp_read_mib($mibdir . '/SNMPv2-MIB.txt'));
2524
--EXPECTF--
2625
Checking error handling
2726

28-
Warning: snmp_read_mib() expects exactly 1 parameter, 0 given in %s on line %d
29-
bool(false)
30-
3127
Warning: snmp_read_mib(): Error while reading MIB file '%s': No such file or directory in %s on line %d
3228
bool(false)
3329
Checking working

ext/snmp/tests/snmp_set_enum_print.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ if (!function_exists('snmp_set_enum_print')) die('This function is only availabl
1111
<?php
1212
require_once(__DIR__.'/snmp_include.inc');
1313

14-
echo "Checking error handling\n";
15-
var_dump(snmp_set_enum_print());
16-
1714
echo "Checking working\n";
1815
var_dump(snmp_set_enum_print(0));
1916
var_dump(snmp_set_enum_print(1));
2017
?>
2118
--EXPECTF--
22-
Checking error handling
23-
24-
Warning: snmp_set_enum_print() expects exactly 1 parameter, 0 given in %s on line %d
25-
bool(false)
2619
Checking working
2720
bool(true)
2821
bool(true)

ext/snmp/tests/snmp_set_oid_output_format.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ if (!function_exists('snmp_set_oid_output_format')) die('This function is only a
1212
require_once(__DIR__.'/snmp_include.inc');
1313

1414
echo "Checking error handling\n";
15-
var_dump(snmp_set_oid_output_format());
1615
var_dump(snmp_set_oid_output_format(123));
1716

1817
echo "Checking working\n";
@@ -22,9 +21,6 @@ var_dump(snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC));
2221
--EXPECTF--
2322
Checking error handling
2423

25-
Warning: snmp_set_oid_output_format() expects exactly 1 parameter, 0 given in %s on line %d
26-
bool(false)
27-
2824
Warning: snmp_set_oid_output_format(): Unknown SNMP output print format '123' in %s on line %d
2925
bool(false)
3026
Checking working

ext/snmp/tests/snmprealwalk.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(snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', ''));
19-
var_dump(snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, ''));
20-
2117
echo "Checking working\n";
2218
echo "Single OID\n";
2319
$return = snmprealwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries);
@@ -50,13 +46,6 @@ var_dump($return);
5046

5147
?>
5248
--EXPECTF--
53-
Checking error handling
54-
55-
Warning: snmprealwalk() expects parameter 4 to be int, %s given in %s on line %d
56-
bool(false)
57-
58-
Warning: snmprealwalk() expects parameter 5 to be int, %s given in %s on line %d
59-
bool(false)
6049
Checking working
6150
Single OID
6251
string(5) "array"

ext/snmp/tests/snmpwalk.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(snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', ''));
19-
var_dump(snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, ''));
20-
2117
echo "Checking working\n";
2218
echo "Single OID\n";
2319
$return = snmpwalk($hostname, $community, '.1.3.6.1.2.1.1', $timeout, $retries);
@@ -58,13 +54,6 @@ var_dump($return);
5854

5955
?>
6056
--EXPECTF--
61-
Checking error handling
62-
63-
Warning: snmpwalk() expects parameter 4 to be int, %s given in %s on line %d
64-
bool(false)
65-
66-
Warning: snmpwalk() expects parameter 5 to be int, %s given in %s on line %d
67-
bool(false)
6857
Checking working
6958
Single OID
7059
string(5) "array"

0 commit comments

Comments
 (0)