From: Fabien Potencier Date: Sat, 11 Oct 2014 16:53:37 +0000 (+0200) Subject: added some more tests X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d3eda6aedd38950acc2019abc02a9f92196f5395;p=web%2Fkonrad%2Ftwig.git added some more tests --- diff --git a/test/Twig/Tests/Fixtures/filters/date.test b/test/Twig/Tests/Fixtures/filters/date.test index d40bb04..0bfaa27 100644 --- a/test/Twig/Tests/Fixtures/filters/date.test +++ b/test/Twig/Tests/Fixtures/filters/date.test @@ -31,6 +31,10 @@ {{ date6|date('e', false) }} {{ date7|date }} +{{ date7|date(timezone='Europe/Paris') }} +{{ date7|date(timezone='Asia/Hong_Kong') }} +{{ date7|date(timezone=false) }} +{{ date7|date(timezone='Indian/Mauritius') }} --DATA-- date_default_timezone_set('Europe/Paris'); return array( @@ -40,7 +44,7 @@ return array( 'date4' => 1286199900, // DateTime::createFromFormat('Y-m-d H:i', '2010-10-04 13:45', new DateTimeZone('UTC'))->getTimestamp() -- A unixtimestamp is always GMT 'date5' => -189291360, // DateTime::createFromFormat('Y-m-d H:i', '1964-01-02 03:04', new DateTimeZone('UTC'))->getTimestamp(), 'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')), - 'date7' => '2010-01-28T15:00:00+05:00', + 'date7' => '2010-01-28T15:00:00+04:00', 'timezone1' => new DateTimeZone('America/New_York'), ) --EXPECT-- @@ -73,4 +77,8 @@ January 2, 1964 04:04 Europe/Paris America/New_York -January 28, 2010 11:00 +January 28, 2010 12:00 +January 28, 2010 12:00 +January 28, 2010 19:00 +January 28, 2010 15:00 +January 28, 2010 15:00