ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
FactoryRuntimeLoaderTest.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_FactoryRuntimeLoaderTest
extends
\PHPUnit\Framework\TestCase
13
{
14
public
function
testLoad
()
15
{
16
$loader
=
new
Twig_FactoryRuntimeLoader
(
array
(
'stdClass'
=>
'getRuntime'
));
17
18
$this->assertInstanceOf(
'stdClass'
,
$loader
->load(
'stdClass'
));
19
}
20
21
public
function
testLoadReturnsNullForUnmappedRuntime
()
22
{
23
$loader
=
new
Twig_FactoryRuntimeLoader
();
24
25
$this->assertNull(
$loader
->load(
'stdClass'
));
26
}
27
}
28
29
function
getRuntime
()
30
{
31
return
new
stdClass();
32
}
getRuntime
getRuntime()
Definition:
FactoryRuntimeLoaderTest.php:29
Twig_Tests_FactoryRuntimeLoaderTest\testLoad
testLoad()
Definition:
FactoryRuntimeLoaderTest.php:14
Twig_FactoryRuntimeLoader
Lazy loads the runtime implementations for a Twig element.
Definition:
FactoryRuntimeLoader.php:17
$loader
$loader
Definition:
generate-schema-cache.php:29
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
Twig_Tests_FactoryRuntimeLoaderTest\testLoadReturnsNullForUnmappedRuntime
testLoadReturnsNullForUnmappedRuntime()
Definition:
FactoryRuntimeLoaderTest.php:21
Twig_Tests_FactoryRuntimeLoaderTest
Definition:
FactoryRuntimeLoaderTest.php:12
libs
composer
vendor
twig
twig
test
Twig
Tests
FactoryRuntimeLoaderTest.php
Generated on Sat Jan 18 2025 19:01:13 for ILIAS by
1.8.13 (using
Doxyfile
)