Annotation of embedaddon/php/ext/date/tests/timezone_open_error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test timezone_open() function : error conditions
3: --FILE--
4: <?php
5: /* Prototype : DateTimeZone timezone_open ( string $timezone )
6: * Description: Returns new DateTimeZone object
7: * Source code: ext/date/php_date.c
8: * Alias to functions: DateTime::__construct()
9: */
10:
11: echo "*** Testing timezone_open() : error conditions ***\n";
12:
13: echo "\n-- Testing timezone_open() function with zero arguments --\n";
14: var_dump( timezone_open() );
15:
16: echo "\n-- Testing timezone_open() function with more than expected no. of arguments --\n";
17: $time = "GMT";
18: $extra_arg = 99;
19: var_dump( timezone_open($time, $extra_arg) );
20:
21: ?>
22: ===DONE===
23: --EXPECTF--
24: *** Testing timezone_open() : error conditions ***
25:
26: -- Testing timezone_open() function with zero arguments --
27:
28: Warning: timezone_open() expects exactly 1 parameter, 0 given in %s on line %d
29: bool(false)
30:
31: -- Testing timezone_open() function with more than expected no. of arguments --
32:
33: Warning: timezone_open() expects exactly 1 parameter, 2 given in %s on line %d
34: bool(false)
35: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>