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

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

Member Function Documentation

◆ getTests()

Twig_Tests_Node_BlockTest::getTests ( )

Definition at line 23 of file BlockTest.php.

References array, and EOF.

24  {
25  $body = new Twig_Node_Text('foo', 1);
26  $node = new Twig_Node_Block('foo', $body, 1);
27 
28  return array(
29  array($node, <<<EOF
30 // line 1
31 public function block_foo(\$context, array \$blocks = array())
32 {
33  echo "foo";
34 }
35 EOF
36  ),
37  );
38  }
Represents a block node.
Definition: Block.php:18
Create styles array
The data for the language used.
Represents a text node.
Definition: Text.php:18
const EOF
How fgetc() reports an End Of File.
Definition: JSMin_lib.php:92

◆ testConstructor()

Twig_Tests_Node_BlockTest::testConstructor ( )

Definition at line 14 of file BlockTest.php.

15  {
16  $body = new Twig_Node_Text('foo', 1);
17  $node = new Twig_Node_Block('foo', $body, 1);
18 
19  $this->assertEquals($body, $node->getNode('body'));
20  $this->assertEquals('foo', $node->getAttribute('name'));
21  }
Represents a block node.
Definition: Block.php:18
Represents a text node.
Definition: Text.php:18

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