xref: /PHP-7.3/ext/snmp/tests/reflection.phpt (revision ded3d984)
1--TEST--
2Test SNMP Reflection
3--SKIPIF--
4<?php if (!extension_loaded('snmp')) die ("skip no snmp extension"); ?>
5--FILE--
6<?php
7
8/* ALL PHP_ME user callable methods of SNMP class should appear here */
9
10reflection::export(new reflectionmethod('snmp', '__construct'));
11reflection::export(new reflectionmethod('snmp', 'close'));
12reflection::export(new reflectionmethod('snmp', 'setSecurity'));
13reflection::export(new reflectionmethod('snmp', 'get'));
14reflection::export(new reflectionmethod('snmp', 'getnext'));
15reflection::export(new reflectionmethod('snmp', 'walk'));
16reflection::export(new reflectionmethod('snmp', 'set'));
17reflection::export(new reflectionmethod('snmp', 'getErrno'));
18reflection::export(new reflectionmethod('snmp', 'getError'));
19
20
21?>
22===DONE===
23<?php exit(0); ?>
24--EXPECT--
25Method [ <internal:snmp, ctor> public method __construct ] {
26
27  - Parameters [5] {
28    Parameter #0 [ <required> $version ]
29    Parameter #1 [ <required> $host ]
30    Parameter #2 [ <required> $community ]
31    Parameter #3 [ <optional> $timeout ]
32    Parameter #4 [ <optional> $retries ]
33  }
34}
35
36Method [ <internal:snmp> public method close ] {
37
38  - Parameters [0] {
39  }
40}
41
42Method [ <internal:snmp> public method setSecurity ] {
43
44  - Parameters [7] {
45    Parameter #0 [ <required> $sec_level ]
46    Parameter #1 [ <required> $auth_protocol ]
47    Parameter #2 [ <required> $auth_passphrase ]
48    Parameter #3 [ <required> $priv_protocol ]
49    Parameter #4 [ <required> $priv_passphrase ]
50    Parameter #5 [ <required> $contextName ]
51    Parameter #6 [ <required> $contextEngineID ]
52  }
53}
54
55Method [ <internal:snmp> public method get ] {
56
57  - Parameters [2] {
58    Parameter #0 [ <required> $object_id ]
59    Parameter #1 [ <optional> $use_orignames ]
60  }
61}
62
63Method [ <internal:snmp> public method getnext ] {
64
65  - Parameters [2] {
66    Parameter #0 [ <required> $object_id ]
67    Parameter #1 [ <optional> $use_orignames ]
68  }
69}
70
71Method [ <internal:snmp> public method walk ] {
72
73  - Parameters [4] {
74    Parameter #0 [ <required> $object_id ]
75    Parameter #1 [ <required> $suffix_keys ]
76    Parameter #2 [ <required> $max_repetitions ]
77    Parameter #3 [ <required> $non_repeaters ]
78  }
79}
80
81Method [ <internal:snmp> public method set ] {
82
83  - Parameters [3] {
84    Parameter #0 [ <required> $object_id ]
85    Parameter #1 [ <required> $type ]
86    Parameter #2 [ <required> $value ]
87  }
88}
89
90Method [ <internal:snmp> public method getErrno ] {
91
92  - Parameters [0] {
93  }
94}
95
96Method [ <internal:snmp> public method getError ] {
97
98  - Parameters [0] {
99  }
100}
101
102===DONE===
103