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

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

Member Function Documentation

◆ getTests()

Twig_Tests_Node_SpacelessTest::getTests ( )

Definition at line 22 of file SpacelessTest.php.

References array, and EOF.

23  {
24  $body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
25  $node = new Twig_Node_Spaceless($body, 1);
26 
27  return array(
28  array($node, <<<EOF
29 // line 1
30 ob_start();
31 echo "<div> <div> foo </div> </div>";
32 echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
33 EOF
34  ),
35  );
36  }
Represents a node in the AST.
Definition: Node.php:18
Represents a spaceless node.
Definition: Spaceless.php:19
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_SpacelessTest::testConstructor ( )

Definition at line 14 of file SpacelessTest.php.

References array.

15  {
16  $body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
17  $node = new Twig_Node_Spaceless($body, 1);
18 
19  $this->assertEquals($body, $node->getNode('body'));
20  }
Represents a node in the AST.
Definition: Node.php:18
Represents a spaceless node.
Definition: Spaceless.php:19
Create styles array
The data for the language used.
Represents a text node.
Definition: Text.php:18

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