1--TEST--
2Test new DateTimeZone() : error conditions
3--FILE--
4<?php
5/* Prototype  : DateTimeZone::__construct  ( string $timezone  )
6 * Description: Returns new DateTimeZone object
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10//Set the default time zone
11date_default_timezone_set("GMT");
12
13echo "*** Testing DateTimeZone() : error conditions ***\n";
14
15echo "\n-- Testing new DateTimeZone() with more than expected no. of arguments --\n";
16$timezone = "GMT";
17$extra_arg = 99;
18try {
19    new DateTimeZone($timezone, $extra_arg);
20} catch (TypeError $e) {
21    echo $e->getMessage(), "\n";
22}
23
24?>
25===DONE===
26--EXPECT--
27*** Testing DateTimeZone() : error conditions ***
28
29-- Testing new DateTimeZone() with more than expected no. of arguments --
30DateTimeZone::__construct() expects exactly 1 parameter, 2 given
31===DONE===
32