/** * @test */ public function processReenablesEscapingInterceptorOnClosingViewHelperTagIfItWasDisabledBefore() { $interceptorPosition = \TYPO3\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER; $this->escapeInterceptor->_set('interceptorEnabled', FALSE); $this->escapeInterceptor->_set('viewHelperNodesWhichDisableTheInterceptor', array($this->mockNode)); $this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState); $this->assertTrue($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')); }