/**
  * @test
  */
 public function processDisablesEscapingInterceptorIfViewHelperDisablesIt()
 {
     $interceptorPosition = \TYPO3\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER;
     $this->mockViewHelper->expects($this->once())->method('isEscapingInterceptorEnabled')->will($this->returnValue(FALSE));
     $this->mockNode->expects($this->once())->method('getUninitializedViewHelper')->will($this->returnValue($this->mockViewHelper));
     $this->assertTrue($this->escapeInterceptor->_get('interceptorEnabled'));
     $this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState);
     $this->assertFalse($this->escapeInterceptor->_get('interceptorEnabled'));
 }
 /**
  * @test
  */
 public function processReenablesEscapingInterceptorOnClosingViewHelperTagIfItWasDisabledBefore()
 {
     $interceptorPosition = InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER;
     $this->mockViewHelper->expects($this->any())->method('isOutputEscapingEnabled')->will($this->returnValue(false));
     $this->mockNode->expects($this->any())->method('getUninitializedViewHelper')->will($this->returnValue($this->mockViewHelper));
     $this->escapeInterceptor->_set('childrenEscapingEnabled', false);
     $this->escapeInterceptor->_set('viewHelperNodesWhichDisableTheInterceptor', array($this->mockNode));
     $this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState);
     $this->assertTrue($this->escapeInterceptor->_get('childrenEscapingEnabled'));
 }