From ca0bcf535c0a350d8e4b0d19114189c1d32ddbdd Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 7 Nov 2017 11:25:28 +0000 Subject: Fixed ext/date tests due to changes in Olson database --- ext/date/tests/010.phpt | 19 +++------ ext/date/tests/DateTimeZone_getLocation.phpt | 24 +---------- .../DateTimeZone_listAbbreviations_basic1.phpt | 47 ++++++++++++--------- ext/date/tests/bug45081.phpt | 2 +- .../tests/timezone_abbreviations_list_basic1.phpt | 49 +++++++++++++--------- ext/date/tests/timezone_name_from_abbr_basic1.phpt | 14 +------ 6 files changed, 66 insertions(+), 89 deletions(-) diff --git a/ext/date/tests/010.phpt b/ext/date/tests/010.phpt index 8b39229703..ff42de5dea 100644 --- a/ext/date/tests/010.phpt +++ b/ext/date/tests/010.phpt @@ -8,17 +8,8 @@ date_default_timezone_set('UTC'); echo "Done\n"; ?> --EXPECTF-- -array(6) { +array(5) { [0]=> - array(3) { - ["dst"]=> - bool(false) - ["offset"]=> - int(0) - ["timezone_id"]=> - string(16) "Antarctica/Troll" - } - [1]=> array(3) { ["dst"]=> bool(false) @@ -27,7 +18,7 @@ array(6) { ["timezone_id"]=> string(13) "Etc/Universal" } - [2]=> + [1]=> array(3) { ["dst"]=> bool(false) @@ -36,7 +27,7 @@ array(6) { ["timezone_id"]=> string(7) "Etc/UTC" } - [3]=> + [2]=> array(3) { ["dst"]=> bool(false) @@ -45,7 +36,7 @@ array(6) { ["timezone_id"]=> string(8) "Etc/Zulu" } - [4]=> + [3]=> array(3) { ["dst"]=> bool(false) @@ -54,7 +45,7 @@ array(6) { ["timezone_id"]=> string(3) "UTC" } - [5]=> + [4]=> array(3) { ["dst"]=> bool(false) diff --git a/ext/date/tests/DateTimeZone_getLocation.phpt b/ext/date/tests/DateTimeZone_getLocation.phpt index 8e6e33bd17..011f0460f3 100644 --- a/ext/date/tests/DateTimeZone_getLocation.phpt +++ b/ext/date/tests/DateTimeZone_getLocation.phpt @@ -1,6 +1,5 @@ --TEST-- -DateTimeZone::getLocation -- timezone_location_get — Returns location information for a timezone -public array DateTimeZone::getLocation ( void ) ; +DateTimeZone::getLocation -- timezone_location_get — Returns location information for a timezone public array DateTimeZone::getLocation ( void ) ; --CREDITS-- marcosptf - - #phparty7 - @phpsp - novatec/2015 - sao paulo - br --SKIPIF-- @@ -53,30 +52,9 @@ Array [comments] => %s ) Array -( - [country_code] => %s - [latitude] => %f - [longitude] => %f - [comments] => -) -Array ( [country_code] => %s [latitude] => %f [longitude] => %f [comments] => %s ) -Array -( - [country_code] => %s - [latitude] => %f - [longitude] => %f - [comments] => %s -) -Array -( - [country_code] => %s - [latitude] => %f - [longitude] => %f - [comments] => -) diff --git a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt index e4a5dbd175..5d68abe05f 100644 --- a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt @@ -29,15 +29,15 @@ string(5) "array" int(%d) -- Format a sample entry -- -array(11) { +array(12) { [0]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(18) "America/Porto_Acre" + string(18) "Australia/Adelaide" } [1]=> array(3) { @@ -51,40 +51,49 @@ array(11) { [2]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(16) "America/Eirunepe" + string(21) "Australia/Broken_Hill" } [3]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(18) "America/Rio_Branco" + string(16) "Australia/Darwin" } [4]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(11) "Brazil/Acre" + string(15) "Australia/North" } [5]=> array(3) { ["dst"]=> bool(false) ["offset"]=> - int(34200) + int(32400) ["timezone_id"]=> - string(13) "Asia/Jayapura" + string(15) "Australia/South" } [6]=> + array(3) { + ["dst"]=> + bool(false) + ["offset"]=> + int(32400) + ["timezone_id"]=> + string(20) "Australia/Yancowinna" + } + [7]=> array(3) { ["dst"]=> bool(false) @@ -93,7 +102,7 @@ array(11) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [7]=> + [8]=> array(3) { ["dst"]=> bool(false) @@ -102,7 +111,7 @@ array(11) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [8]=> + [9]=> array(3) { ["dst"]=> bool(false) @@ -111,7 +120,7 @@ array(11) { ["timezone_id"]=> string(15) "Australia/North" } - [9]=> + [10]=> array(3) { ["dst"]=> bool(false) @@ -120,7 +129,7 @@ array(11) { ["timezone_id"]=> string(15) "Australia/South" } - [10]=> + [11]=> array(3) { ["dst"]=> bool(false) diff --git a/ext/date/tests/bug45081.phpt b/ext/date/tests/bug45081.phpt index 20733c686a..a312b52260 100644 --- a/ext/date/tests/bug45081.phpt +++ b/ext/date/tests/bug45081.phpt @@ -5,7 +5,7 @@ date.timezone=Asia/Singapore --FILE-- array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(18) "America/Porto_Acre" + string(18) "Australia/Adelaide" } [1]=> array(3) { @@ -51,40 +51,49 @@ array(11) { [2]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(16) "America/Eirunepe" + string(21) "Australia/Broken_Hill" } [3]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(18) "America/Rio_Branco" + string(16) "Australia/Darwin" } [4]=> array(3) { ["dst"]=> - bool(true) + bool(false) ["offset"]=> - int(-14400) + int(32400) ["timezone_id"]=> - string(11) "Brazil/Acre" + string(15) "Australia/North" } [5]=> array(3) { ["dst"]=> bool(false) ["offset"]=> - int(34200) + int(32400) ["timezone_id"]=> - string(13) "Asia/Jayapura" + string(15) "Australia/South" } [6]=> + array(3) { + ["dst"]=> + bool(false) + ["offset"]=> + int(32400) + ["timezone_id"]=> + string(20) "Australia/Yancowinna" + } + [7]=> array(3) { ["dst"]=> bool(false) @@ -93,7 +102,7 @@ array(11) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [7]=> + [8]=> array(3) { ["dst"]=> bool(false) @@ -102,7 +111,7 @@ array(11) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [8]=> + [9]=> array(3) { ["dst"]=> bool(false) @@ -111,7 +120,7 @@ array(11) { ["timezone_id"]=> string(15) "Australia/North" } - [9]=> + [10]=> array(3) { ["dst"]=> bool(false) @@ -120,7 +129,7 @@ array(11) { ["timezone_id"]=> string(15) "Australia/South" } - [10]=> + [11]=> array(3) { ["dst"]=> bool(false) diff --git a/ext/date/tests/timezone_name_from_abbr_basic1.phpt b/ext/date/tests/timezone_name_from_abbr_basic1.phpt index b591fe28f9..b6a0bd94f7 100644 --- a/ext/date/tests/timezone_name_from_abbr_basic1.phpt +++ b/ext/date/tests/timezone_name_from_abbr_basic1.phpt @@ -24,11 +24,6 @@ var_dump( timezone_name_from_abbr("EDT") ); echo "-- Lookup with name and offset--\n"; var_dump( timezone_name_from_abbr("ADT", -10800) ); var_dump( timezone_name_from_abbr("ADT", 14400) ); -var_dump( timezone_name_from_abbr("AKTT", 14400) ); -var_dump( timezone_name_from_abbr("aktt", 18000) ); -var_dump( timezone_name_from_abbr("Aktt", 21600) ); -var_dump( timezone_name_from_abbr("AMST", -10800) ); -var_dump( timezone_name_from_abbr("amst", 180000) ); echo "-- Tests without valid name - uses gmtOffset and isdst to find match --\n"; var_dump( timezone_name_from_abbr("", 3600, 1) ); @@ -51,12 +46,7 @@ string(13) "Europe/Berlin" string(16) "America/New_York" -- Lookup with name and offset-- string(15) "America/Halifax" -string(12) "Asia/Baghdad" -string(11) "Asia/Aqtobe" -string(11) "Asia/Aqtobe" -string(11) "Asia/Aqtobe" -string(17) "America/Boa_Vista" -string(12) "Asia/Yerevan" +string(15) "America/Halifax" -- Tests without valid name - uses gmtOffset and isdst to find match -- string(13) "Europe/London" string(17) "America/Sao_Paulo" @@ -65,4 +55,4 @@ string(15) "America/Halifax" -- Tests with invalid offsets -- bool(false) bool(false) -===DONE=== \ No newline at end of file +===DONE=== -- cgit v1.2.1