ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Tests_Node_ImportTest Class Reference
+ Inheritance diagram for Twig_Tests_Node_ImportTest:
+ Collaboration diagram for Twig_Tests_Node_ImportTest:

Public Member Functions

 testConstructor ()
 
 getTests ()
 
- Public Member Functions inherited from Twig_Test_NodeTestCase
 getTests ()
 
 testCompile ($node, $source, $environment=null, $isPattern=false)
 getTests More...
 
 assertNodeCompilation ($source, Twig_Node $node, Twig_Environment $environment=null, $isPattern=false)
 

Additional Inherited Members

- Protected Member Functions inherited from Twig_Test_NodeTestCase
 getCompiler (Twig_Environment $environment=null)
 
 getEnvironment ()
 
 getVariableGetter ($name, $line=false)
 
 getAttributeGetter ()
 

Detailed Description

Definition at line 12 of file ImportTest.php.

Member Function Documentation

◆ getTests()

Twig_Tests_Node_ImportTest::getTests ( )

Definition at line 24 of file ImportTest.php.

References array, and EOF.

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  }
Create styles array
The data for the language used.
Represents an import node.
Definition: Import.php:17
const EOF
How fgetc() reports an End Of File.
Definition: JSMin_lib.php:92

◆ testConstructor()

Twig_Tests_Node_ImportTest::testConstructor ( )

Definition at line 14 of file ImportTest.php.

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  }
Represents an import node.
Definition: Import.php:17

The documentation for this class was generated from the following file: