ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
LegacyIntegrationTest.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_LegacyIntegrationTest
extends
Twig_Test_IntegrationTestCase
13
{
14
public
function
getExtensions
()
15
{
16
return
array
(
17
new
LegacyTwigTestExtension
(),
18
);
19
}
20
21
public
function
getFixturesDir
()
22
{
23
return
dirname(__FILE__).
'/LegacyFixtures/'
;
24
}
25
26
public
function
getTests
(
$name
, $legacyTests =
false
)
27
{
28
if
(!$legacyTests) {
29
return
array
(
array
(
''
,
''
,
''
,
array
(),
''
,
array
()));
30
}
31
32
return
parent::getTests(
$name
,
true
);
33
}
34
}
35
36
class
LegacyTwigTestExtension
extends
Twig_Extension
37
{
38
public
function
getTests
()
39
{
40
return
array
(
41
'multi word'
=>
new
Twig_Test_Method
($this,
'is_multi_word'
),
42
);
43
}
44
45
public
function
is_multi_word
($value)
46
{
47
return
false
!== strpos($value,
' '
);
48
}
49
50
public
function
getName
()
51
{
52
return
'legacy_integration_test'
;
53
}
54
}
Twig_Test_Method
Represents a method template test.
Definition:
Method.php:21
Twig_Test_IntegrationTestCase
Integration test helper.
Definition:
IntegrationTestCase.php:20
Twig_Extension
Definition:
Extension.php:12
$name
if($format !==null) $name
Definition:
metadata.php:146
Twig_Tests_LegacyIntegrationTest\getExtensions
getExtensions()
Definition:
LegacyIntegrationTest.php:14
Twig_Tests_LegacyIntegrationTest\getFixturesDir
getFixturesDir()
Definition:
LegacyIntegrationTest.php:21
LegacyTwigTestExtension\getName
getName()
Returns the name of the extension.
Definition:
LegacyIntegrationTest.php:50
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
LegacyTwigTestExtension\is_multi_word
is_multi_word($value)
Definition:
LegacyIntegrationTest.php:45
LegacyTwigTestExtension\getTests
getTests()
Returns a list of tests to add to the existing list.
Definition:
LegacyIntegrationTest.php:38
LegacyTwigTestExtension
Definition:
LegacyIntegrationTest.php:36
Twig_Tests_LegacyIntegrationTest\getTests
getTests($name, $legacyTests=false)
Definition:
LegacyIntegrationTest.php:26
Twig_Tests_LegacyIntegrationTest
Definition:
LegacyIntegrationTest.php:12
libs
composer
vendor
twig
twig
test
Twig
Tests
LegacyIntegrationTest.php
Generated on Tue Jan 28 2025 19:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)