1--TEST--
2Test get_class_methods() function : error conditions
3--FILE--
4<?php
5/* Prototype  : proto array get_class_methods(mixed class)
6 * Description: Returns an array of method names for class or class instance.
7 * Source code: Zend/zend_builtin_functions.c
8 * Alias to functions:
9 */
10
11/*
12 * Test wrong number of arguments.
13 */
14
15echo "*** Testing get_class_methods() : error conditions ***\n";
16
17// Zero arguments
18echo "\n-- Testing get_class_methods() function with Zero arguments --\n";
19var_dump( get_class_methods() );
20
21//Test get_class_methods with one more than the expected number of arguments
22echo "\n-- Testing get_class_methods() function with more than expected no. of arguments --\n";
23$class = 1;
24$extra_arg = 10;
25var_dump( get_class_methods($class, $extra_arg) );
26
27echo "Done";
28?>
29--EXPECTF--
30*** Testing get_class_methods() : error conditions ***
31
32-- Testing get_class_methods() function with Zero arguments --
33
34Warning: get_class_methods() expects exactly 1 parameter, 0 given in %s on line 16
35NULL
36
37-- Testing get_class_methods() function with more than expected no. of arguments --
38
39Warning: get_class_methods() expects exactly 1 parameter, 2 given in %s on line 22
40NULL
41Done