TYPO3 CMS  TYPO3_6-2
RawViewHelperTest.php
Go to the documentation of this file.
1 <?php
3 
4 /* *
5  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6  * *
7  * It is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU General Public License, either version 3 of the *
9  * License, or (at your option) any later version. *
10  * *
11  * The TYPO3 project - inspiring people to share! *
12  * */
13 
18 
22  protected $viewHelper;
23 
24  public function setUp() {
25  $this->viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\RawViewHelper', array('renderChildren'));
26  }
27 
32  $this->assertFalse($this->viewHelper->isEscapingInterceptorEnabled());
33  }
34 
39  $value = 'input value " & äöüß@';
40  $this->viewHelper->expects($this->never())->method('renderChildren');
41  $actualResult = $this->viewHelper->render($value);
42  $this->assertEquals($value, $actualResult);
43  }
44 
49  $childNodes = 'input value " & äöüß@';
50  $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue($childNodes));
51  $actualResult = $this->viewHelper->render();
52  $this->assertEquals($childNodes, $actualResult);
53  }
54 }