ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
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
12
class
Twig_Tests_Extension_IntlTest
extends
PHPUnit_Framework_TestCase
13
{
18
public
function
testLocalizedDateFilterWithDateTimeZone
()
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
}
DateTime
Twig_Tests_Extension_IntlTest
Definition:
IntlTest.php:12
Twig_Tests_Extension_IntlTest\testLocalizedDateFilterWithDateTimeZone
testLocalizedDateFilterWithDateTimeZone()
extension intl PHP 5.5
Definition:
IntlTest.php:18
PHPUnit_Framework_TestCase
$env
$env
Definition:
FilterInclude.php:3
twig_localized_date_filter
twig_localized_date_filter(Twig_Environment $env, $date, $dateFormat='medium', $timeFormat='medium', $locale=null, $timezone=null, $format=null, $calendar='gregorian')
Definition:
Intl.php:42
libs
composer
vendor
twig
extensions
test
Twig
Tests
Extension
IntlTest.php
Generated on Tue Jan 28 2025 19:01:14 for ILIAS by
1.8.13 (using
Doxyfile
)