1--TEST--
2Test timezone_name_from_abbr() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string timezone_name_from_abbr  ( string $abbr  [, int $gmtOffset= -1  [, int $isdst= -1  ]] )
6 * Description: Returns the timezone name from abbrevation
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
11//Set the default time zone
12date_default_timezone_set("Europe/London");
13
14echo "*** Testing timezone_name_from_abbr() : error conditions ***\n";
15
16echo "\n-- Testing timezone_name_from_abbr() function with Zero arguments --\n";
17var_dump( timezone_name_from_abbr() );
18
19echo "\n-- Testing timezone_name_from_abbr() function with more than expected no. of arguments --\n";
20$abbr = 10;
21$gmtOffset = 30;
22$isdst = 45;
23$extra_arg = 10;
24var_dump( timezone_name_from_abbr($abbr, $gmtOffset, $isdst, $extra_arg) );
25
26?>
27===DONE===
28--EXPECTF--
29*** Testing timezone_name_from_abbr() : error conditions ***
30
31-- Testing timezone_name_from_abbr() function with Zero arguments --
32
33Warning: timezone_name_from_abbr() expects at least 1 parameter, 0 given in %s on line %d
34bool(false)
35
36-- Testing timezone_name_from_abbr() function with more than expected no. of arguments --
37
38Warning: timezone_name_from_abbr() expects at most 3 parameters, 4 given in %s on line %d
39bool(false)
40===DONE===
41