1--TEST--
2Test new DateTimeZone() : error conditions
3--FILE--
4<?php
5//Set the default time zone
6date_default_timezone_set("GMT");
7
8echo "*** Testing DateTimeZone() : error conditions ***\n";
9
10echo "\n-- Testing new DateTimeZone() with more than expected no. of arguments --\n";
11$timezone = "GMT";
12$extra_arg = 99;
13try {
14    new DateTimeZone($timezone, $extra_arg);
15} catch (TypeError $e) {
16    echo $e->getMessage(), "\n";
17}
18
19?>
20--EXPECT--
21*** Testing DateTimeZone() : error conditions ***
22
23-- Testing new DateTimeZone() with more than expected no. of arguments --
24DateTimeZone::__construct() expects exactly 1 argument, 2 given
25