Exemple #1
0
 /**
  * @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', [$this->mockNode]);
     $this->escapeInterceptor->process($this->mockNode, $interceptorPosition, $this->mockParsingState);
     $this->assertTrue($this->escapeInterceptor->_get('childrenEscapingEnabled'));
 }