From ba9df1cff628e5ddbcadff3c144f335e39f659b6 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 7 Nov 2017 11:34:55 +0000 Subject: [PATCH] Fixed ext/date tests due to changes in Olson database --- ext/date/tests/DateTimeZone_getLocation.phpt | 7 -- ...DateTimeZone_listAbbreviations_basic1.phpt | 69 ++++-------------- ext/date/tests/bug45081.phpt | 2 +- .../timezone_abbreviations_list_basic1.phpt | 71 ++++--------------- .../tests/timezone_name_from_abbr_basic1.phpt | 4 +- 5 files changed, 27 insertions(+), 126 deletions(-) diff --git a/ext/date/tests/DateTimeZone_getLocation.phpt b/ext/date/tests/DateTimeZone_getLocation.phpt index 2dec10ad57..011f0460f3 100644 --- a/ext/date/tests/DateTimeZone_getLocation.phpt +++ b/ext/date/tests/DateTimeZone_getLocation.phpt @@ -52,13 +52,6 @@ Array [comments] => %s ) Array -( - [country_code] => %s - [latitude] => %f - [longitude] => %f - [comments] => -) -Array ( [country_code] => %s [latitude] => %f diff --git a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt index 1cbaaef377..5d68abe05f 100644 --- a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt @@ -29,17 +29,8 @@ string(5) "array" int(%d) -- Format a sample entry -- -array(17) { +array(12) { [0]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(18) "America/Porto_Acre" - } - [1]=> array(3) { ["dst"]=> bool(false) @@ -48,7 +39,7 @@ array(17) { ["timezone_id"]=> string(18) "Australia/Adelaide" } - [2]=> + [1]=> array(3) { ["dst"]=> bool(false) @@ -57,34 +48,7 @@ array(17) { ["timezone_id"]=> string(18) "Australia/Adelaide" } - [3]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(16) "America/Eirunepe" - } - [4]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(18) "America/Rio_Branco" - } - [5]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(11) "Brazil/Acre" - } - [6]=> + [2]=> array(3) { ["dst"]=> bool(false) @@ -93,7 +57,7 @@ array(17) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [7]=> + [3]=> array(3) { ["dst"]=> bool(false) @@ -102,7 +66,7 @@ array(17) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [8]=> + [4]=> array(3) { ["dst"]=> bool(false) @@ -111,7 +75,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/North" } - [9]=> + [5]=> array(3) { ["dst"]=> bool(false) @@ -120,7 +84,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/South" } - [10]=> + [6]=> array(3) { ["dst"]=> bool(false) @@ -129,16 +93,7 @@ array(17) { ["timezone_id"]=> string(20) "Australia/Yancowinna" } - [11]=> - array(3) { - ["dst"]=> - bool(false) - ["offset"]=> - int(34200) - ["timezone_id"]=> - string(13) "Asia/Jayapura" - } - [12]=> + [7]=> array(3) { ["dst"]=> bool(false) @@ -147,7 +102,7 @@ array(17) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [13]=> + [8]=> array(3) { ["dst"]=> bool(false) @@ -156,7 +111,7 @@ array(17) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [14]=> + [9]=> array(3) { ["dst"]=> bool(false) @@ -165,7 +120,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/North" } - [15]=> + [10]=> array(3) { ["dst"]=> bool(false) @@ -174,7 +129,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/South" } - [16]=> + [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) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(18) "America/Porto_Acre" - } - [1]=> array(3) { ["dst"]=> bool(false) @@ -48,7 +39,7 @@ array(17) { ["timezone_id"]=> string(18) "Australia/Adelaide" } - [2]=> + [1]=> array(3) { ["dst"]=> bool(false) @@ -57,34 +48,7 @@ array(17) { ["timezone_id"]=> string(18) "Australia/Adelaide" } - [3]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(16) "America/Eirunepe" - } - [4]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(18) "America/Rio_Branco" - } - [5]=> - array(3) { - ["dst"]=> - bool(true) - ["offset"]=> - int(-14400) - ["timezone_id"]=> - string(11) "Brazil/Acre" - } - [6]=> + [2]=> array(3) { ["dst"]=> bool(false) @@ -93,7 +57,7 @@ array(17) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [7]=> + [3]=> array(3) { ["dst"]=> bool(false) @@ -102,7 +66,7 @@ array(17) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [8]=> + [4]=> array(3) { ["dst"]=> bool(false) @@ -111,7 +75,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/North" } - [9]=> + [5]=> array(3) { ["dst"]=> bool(false) @@ -120,7 +84,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/South" } - [10]=> + [6]=> array(3) { ["dst"]=> bool(false) @@ -129,16 +93,7 @@ array(17) { ["timezone_id"]=> string(20) "Australia/Yancowinna" } - [11]=> - array(3) { - ["dst"]=> - bool(false) - ["offset"]=> - int(34200) - ["timezone_id"]=> - string(13) "Asia/Jayapura" - } - [12]=> + [7]=> array(3) { ["dst"]=> bool(false) @@ -147,7 +102,7 @@ array(17) { ["timezone_id"]=> string(21) "Australia/Broken_Hill" } - [13]=> + [8]=> array(3) { ["dst"]=> bool(false) @@ -156,7 +111,7 @@ array(17) { ["timezone_id"]=> string(16) "Australia/Darwin" } - [14]=> + [9]=> array(3) { ["dst"]=> bool(false) @@ -165,7 +120,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/North" } - [15]=> + [10]=> array(3) { ["dst"]=> bool(false) @@ -174,7 +129,7 @@ array(17) { ["timezone_id"]=> string(15) "Australia/South" } - [16]=> + [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 492c623eb1..b6a0bd94f7 100644 --- a/ext/date/tests/timezone_name_from_abbr_basic1.phpt +++ b/ext/date/tests/timezone_name_from_abbr_basic1.phpt @@ -24,7 +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("AMST", -10800) ); echo "-- Tests without valid name - uses gmtOffset and isdst to find match --\n"; var_dump( timezone_name_from_abbr("", 3600, 1) ); @@ -47,8 +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(17) "America/Boa_Vista" +string(15) "America/Halifax" -- Tests without valid name - uses gmtOffset and isdst to find match -- string(13) "Europe/London" string(17) "America/Sao_Paulo" -- 2.40.0