diff options
author | Derick Rethans <derick@php.net> | 2008-01-27 17:28:58 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2008-01-27 17:28:58 +0000 |
commit | 14665d9149f3259675bf163ad1430b75fa6987cc (patch) | |
tree | 5be6c01270f8ceda8959183528c116af9aa840ab /ext/date/tests/timezones-list.phpt | |
parent | b952c7f04872817a9cce05bcd2ce10cce37264bb (diff) | |
download | php-git-14665d9149f3259675bf163ad1430b75fa6987cc.tar.gz |
- Added support for selectively listing timezone identifiers through
timezone_identifiers_list() / DateTimezone::listIdentifiers().
Diffstat (limited to 'ext/date/tests/timezones-list.phpt')
-rw-r--r-- | ext/date/tests/timezones-list.phpt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ext/date/tests/timezones-list.phpt b/ext/date/tests/timezones-list.phpt new file mode 100644 index 0000000000..5998498742 --- /dev/null +++ b/ext/date/tests/timezones-list.phpt @@ -0,0 +1,49 @@ +--TEST-- +timezone_identifiers_list() +--FILE-- +<?php +$a = timezone_identifiers_list(); +$b = timezone_identifiers_list( DateTimezone::AMERICA ); +$c = timezone_identifiers_list( DateTimezone::ALL_WITH_BC ); +$d = timezone_identifiers_list( DateTimezone::EUROPE | DateTimezone::UTC ); + +echo in_array( "Europe/Oslo", $a ) ? "found" : "notfound", "\n"; +echo in_array( "Europe/Oslo", $b ) ? "found" : "notfound", "\n"; +echo in_array( "Europe/Oslo", $c ) ? "found" : "notfound", "\n"; +echo in_array( "Europe/Oslo", $d ) ? "found" : "notfound", "\n\n"; + +echo in_array( "America/New_York", $a ) ? "found" : "notfound", "\n"; +echo in_array( "America/New_York", $b ) ? "found" : "notfound", "\n"; +echo in_array( "America/New_York", $c ) ? "found" : "notfound", "\n"; +echo in_array( "America/New_York", $d ) ? "found" : "notfound", "\n\n"; + +echo in_array( "UTC", $a ) ? "found" : "notfound", "\n"; +echo in_array( "UTC", $b ) ? "found" : "notfound", "\n"; +echo in_array( "UTC", $c ) ? "found" : "notfound", "\n"; +echo in_array( "UTC", $d ) ? "found" : "notfound", "\n\n"; + +echo in_array( "US/Eastern", $a ) ? "found" : "notfound", "\n"; +echo in_array( "US/Eastern", $b ) ? "found" : "notfound", "\n"; +echo in_array( "US/Eastern", $c ) ? "found" : "notfound", "\n"; +echo in_array( "US/Eastern", $d ) ? "found" : "notfound", "\n\n"; +?> +--EXPECT-- +found +notfound +found +found + +found +found +found +notfound + +found +notfound +found +found + +notfound +notfound +found +notfound |