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

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 ConditionalTest.php.

Member Function Documentation

◆ getTests()

Twig_Tests_Node_Expression_ConditionalTest::getTests ( )

Definition at line 26 of file ConditionalTest.php.

References array.

27  {
28  $tests = array();
29 
30  $expr1 = new Twig_Node_Expression_Constant(1, 1);
31  $expr2 = new Twig_Node_Expression_Constant(2, 1);
32  $expr3 = new Twig_Node_Expression_Constant(3, 1);
33  $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1);
34  $tests[] = array($node, '((1) ? (2) : (3))');
35 
36  return $tests;
37  }
Create styles array
The data for the language used.

◆ testConstructor()

Twig_Tests_Node_Expression_ConditionalTest::testConstructor ( )

Definition at line 14 of file ConditionalTest.php.

15  {
16  $expr1 = new Twig_Node_Expression_Constant(1, 1);
17  $expr2 = new Twig_Node_Expression_Constant(2, 1);
18  $expr3 = new Twig_Node_Expression_Constant(3, 1);
19  $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1);
20 
21  $this->assertEquals($expr1, $node->getNode('expr1'));
22  $this->assertEquals($expr2, $node->getNode('expr2'));
23  $this->assertEquals($expr3, $node->getNode('expr3'));
24  }

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