ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Twig_Tests_Node_SandboxedPrintTest Class Reference
+ Inheritance diagram for Twig_Tests_Node_SandboxedPrintTest:
+ Collaboration diagram for Twig_Tests_Node_SandboxedPrintTest:

Public Member Functions

 testConstructor ()
 
 getTests ()
 
- Public Member Functions inherited from Twig_Test_NodeTestCase
 getTests ()
 
 testCompile ($node, $source, $environment=null, $isPattern=false)
 @dataProvider 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 SandboxedPrintTest.php.

Member Function Documentation

◆ getTests()

Twig_Tests_Node_SandboxedPrintTest::getTests ( )

Reimplemented from Twig_Test_NodeTestCase.

Definition at line 21 of file SandboxedPrintTest.php.

22 {
23 $tests = array();
24
25 $tests[] = array(new Twig_Node_SandboxedPrint(new Twig_Node_Expression_Constant('foo', 1), 1), <<<EOF
26// line 1
27echo \$this->env->getExtension('Twig_Extension_Sandbox')->ensureToStringAllowed("foo");
28EOF
29 );
30
31 return $tests;
32 }
const EOF
How fgetc() reports an End Of File.
Definition: JSMin_lib.php:92
Twig_Node_SandboxedPrint adds a check for the __toString() method when the variable is an object and ...
$tests
Definition: bench.php:104

References $tests, and EOF.

◆ testConstructor()

Twig_Tests_Node_SandboxedPrintTest::testConstructor ( )

Definition at line 14 of file SandboxedPrintTest.php.

15 {
16 $node = new Twig_Node_SandboxedPrint($expr = new Twig_Node_Expression_Constant('foo', 1), 1);
17
18 $this->assertEquals($expr, $node->getNode('expr'));
19 }

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