TYPO3 CMS  TYPO3_7-6
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 
16 
21 {
25  protected $subject;
26 
27  protected function setUp()
28  {
29  parent::setUp();
30  $this->subject = $this->getMock(RawViewHelper::class, ['renderChildren']);
31  $this->injectDependenciesIntoViewHelper($this->subject);
32  }
33 
38  {
39  $this->assertFalse($this->subject->isEscapingInterceptorEnabled());
40  }
41 
46  {
47  $value = 'input value " & äöüß@';
48  $this->subject->expects($this->never())->method('renderChildren');
49  $actualResult = $this->subject->render($value);
50  $this->assertEquals($value, $actualResult);
51  }
52 
57  {
58  $childNodes = 'input value " & äöüß@';
59  $this->subject->expects($this->once())->method('renderChildren')->will($this->returnValue($childNodes));
60  $actualResult = $this->subject->render();
61  $this->assertEquals($childNodes, $actualResult);
62  }
63 }
injectDependenciesIntoViewHelper(\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper)