ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ImportTest.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_Node_ImportTest
extends
Twig_Test_NodeTestCase
13
{
14
public
function
testConstructor
()
15
{
16
$macro =
new
Twig_Node_Expression_Constant
(
'foo.twig'
, 1);
17
$var =
new
Twig_Node_Expression_AssignName
(
'macro'
, 1);
18
$node =
new
Twig_Node_Import
($macro, $var, 1);
19
20
$this->assertEquals($macro, $node->getNode(
'expr'
));
21
$this->assertEquals($var, $node->getNode(
'var'
));
22
}
23
24
public
function
getTests
()
25
{
26
$tests
= array();
27
28
$macro =
new
Twig_Node_Expression_Constant
(
'foo.twig'
, 1);
29
$var =
new
Twig_Node_Expression_AssignName
(
'macro'
, 1);
30
$node =
new
Twig_Node_Import
($macro, $var, 1);
31
32
$tests
[] = array($node, <<<
EOF
33
// line 1
34
\
$context
[
"macro"
] = \$this->loadTemplate(
"foo.twig"
, null, 1);
35
EOF
36
);
37
38
return
$tests
;
39
}
40
}
Twig_Tests_Node_ImportTest\getTests
getTests()
Definition:
ImportTest.php:24
$context
$context
Definition:
webdav.php:25
Twig_Tests_Node_ImportTest
Definition:
ImportTest.php:12
Twig_Test_NodeTestCase
Definition:
NodeTestCase.php:14
Twig_Node_Expression_AssignName
Definition:
AssignName.php:13
Twig_Tests_Node_ImportTest\testConstructor
testConstructor()
Definition:
ImportTest.php:14
$tests
$tests
Definition:
bench.php:104
Twig_Node_Import
Represents an import node.
Definition:
Import.php:17
Twig_Node_Expression_Constant
Definition:
Constant.php:12
php
EOF
const EOF
How fgetc() reports an End Of File.
Definition:
JSMin_lib.php:92
libs
composer
vendor
twig
twig
test
Twig
Tests
Node
ImportTest.php
Generated on Thu Jan 16 2025 19:01:59 for ILIAS by
1.8.13 (using
Doxyfile
)