ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
IntlTest.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
13{
19 {
20 class_exists('Twig_Extensions_Extension_Intl');
21 $env = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock();
22 $date = twig_localized_date_filter($env, new DateTime('2015-01-01T00:00:00', new DateTimeZone('UTC')), 'short', 'long', 'en', '+01:00');
23 $this->assertEquals('1/1/15 1:00:00 AM GMT+01:00', $date);
24 }
25}
$env
twig_localized_date_filter(Twig_Environment $env, $date, $dateFormat='medium', $timeFormat='medium', $locale=null, $timezone=null, $format=null, $calendar='gregorian')
Definition: Intl.php:42
An exception for terminatinating execution or to throw for unit testing.
testLocalizedDateFilterWithDateTimeZone()
@requires extension intl @requires PHP 5.5
Definition: IntlTest.php:18