PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/snmp/tests/snmp_get_valueretrieval.phpt ('Function snmp_get_valueretrieval / snmp_set_valueretrieval')

Script

1: <?php
2:
require_once(__DIR__.'/snmp_include.inc');
3:
4: echo 
"Checking error handling\n";
5:
var_dump(snmp_get_valueretrieval('noarg'));
6:
var_dump(snmp_set_valueretrieval());
7:
var_dump(snmp_set_valueretrieval('noarg'));
8:
var_dump(snmp_set_valueretrieval(67));
9:
10: echo 
"Checking working\n";
11:
var_dump(snmp_get_valueretrieval());
12:
snmp_set_valueretrieval(SNMP_VALUE_LIBRARY);
13:
var_dump(snmp_get_valueretrieval() === SNMP_VALUE_LIBRARY);
14:
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
15:
var_dump(snmp_get_valueretrieval() === SNMP_VALUE_PLAIN);
16:
snmp_set_valueretrieval(SNMP_VALUE_OBJECT);
17:
var_dump(snmp_get_valueretrieval() === SNMP_VALUE_OBJECT);
18:
snmp_set_valueretrieval(SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT);
19:
var_dump(snmp_get_valueretrieval() === (SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT));
20:
snmp_set_valueretrieval(SNMP_VALUE_LIBRARY|SNMP_VALUE_OBJECT);
21:
var_dump(snmp_get_valueretrieval() === (SNMP_VALUE_LIBRARY|SNMP_VALUE_OBJECT));
22:
23:
?>
24:

Expected

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
int(%d)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)

Output

Checking error handling

Fatal error: Uncaught ArgumentCountError: snmp_get_valueretrieval() expects exactly 0 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php:5
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php(5): snmp_get_valueretrieval('noarg')
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php on line 5

Diff

003+ Fatal error: Uncaught ArgumentCountError: snmp_get_valueretrieval() expects exactly 0 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php:5
004+ Stack trace:
005+ #0 /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php(5): snmp_get_valueretrieval('noarg')
006+ #1 {main}
007+   thrown in /var/php_gcov/PHP_HEAD/ext/snmp/tests/snmp_get_valueretrieval.php on line 5
003- Warning: snmp_get_valueretrieval() expects exactly 0 parameters, 1 given in %s on line %d
004- bool(false)
005- 
006- Warning: snmp_set_valueretrieval() expects exactly 1 parameter, 0 given in %s on line %d
007- bool(false)
008- 
009- Warning: snmp_set_valueretrieval() expects parameter 1 to be int, %s given in %s on line %d
010- bool(false)
011- 
012- Warning: snmp_set_valueretrieval(): Unknown SNMP value retrieval method '67' in %s on line %d
013- bool(false)
014- Checking working
015- int(%d)
016- bool(true)
017- bool(true)
018- bool(true)
019- bool(true)
020- bool(true)

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (942 days ago)

Copyright © 2005-2021 The PHP Group
All rights reserved.