1--TEST--
2Test 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
11echo "*** Testing timezone_open() : error conditions ***\n";
12
13echo "\n-- Testing timezone_open() function with zero arguments --\n";
14var_dump( timezone_open() );
15
16echo "\n-- Testing timezone_open() function with more than expected no. of arguments --\n";
17$time = "GMT";
18$extra_arg = 99;
19var_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
28Warning: timezone_open() expects exactly 1 parameter, 0 given in %s on line %d
29bool(false)
30
31-- Testing timezone_open() function with more than expected no. of arguments --
32
33Warning: timezone_open() expects exactly 1 parameter, 2 given in %s on line %d
34bool(false)
35===DONE===
36