diff options
author | Derick Rethans <github@derickrethans.nl> | 2017-11-07 11:34:55 +0000 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2017-11-07 11:34:55 +0000 |
commit | ba9df1cff628e5ddbcadff3c144f335e39f659b6 (patch) | |
tree | 491497a7ad01c835be4ab2c952b290d41f3165dd | |
parent | c842e1ac531239b57c31fa82143d8a030ca37cc9 (diff) | |
download | php-git-ba9df1cff628e5ddbcadff3c144f335e39f659b6.tar.gz |
Fixed ext/date tests due to changes in Olson database
-rw-r--r-- | ext/date/tests/DateTimeZone_getLocation.phpt | 7 | ||||
-rw-r--r-- | ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt | 69 | ||||
-rw-r--r-- | ext/date/tests/bug45081.phpt | 2 | ||||
-rw-r--r-- | ext/date/tests/timezone_abbreviations_list_basic1.phpt | 71 | ||||
-rw-r--r-- | ext/date/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 @@ -56,12 +56,5 @@ Array [country_code] => %s [latitude] => %f [longitude] => %f - [comments] => -) -Array -( - [country_code] => %s - [latitude] => %f - [longitude] => %f [comments] => %s ) 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,26 +29,17 @@ 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) ["offset"]=> int(32400) ["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-- <?php -print strtotime('2008-05-23 00:00:00 SGT'); +print strtotime('2008-05-23 00:00:00 +08'); print "\n"; print strtotime('2008-05-23 00:00:00'); diff --git a/ext/date/tests/timezone_abbreviations_list_basic1.phpt b/ext/date/tests/timezone_abbreviations_list_basic1.phpt index 7a0dcdee98..c3510f1e64 100644 --- a/ext/date/tests/timezone_abbreviations_list_basic1.phpt +++ b/ext/date/tests/timezone_abbreviations_list_basic1.phpt @@ -26,29 +26,20 @@ var_dump( $abbr["acst"] ); --EXPECTF-- *** Testing timezone_abbreviations_list() : basic functionality *** string(5) "array" -int(%d) +int(142) -- 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) ["offset"]=> int(32400) ["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" |