/** * @test */ public function processWrapsCurrentViewHelperInEscapeNode() { $interceptorPosition = InterceptorInterface::INTERCEPT_OBJECTACCESSOR; $mockNode = $this->getMock(ObjectAccessorNode::class, [], [], '', false); $actualResult = $this->escapeInterceptor->process($mockNode, $interceptorPosition, $this->mockParsingState); $this->assertInstanceOf(EscapingNode::class, $actualResult); }
/** * @test */ public function processWrapsCurrentViewHelperInHtmlspecialcharsViewHelperOnObjectAccessor() { $interceptorPosition = InterceptorInterface::INTERCEPT_OBJECTACCESSOR; $mockNode = $this->getMock('TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ObjectAccessorNode', array(), array(), '', FALSE); $mockEscapeViewHelper = $this->getMock('TYPO3Fluid\\Fluid\\ViewHelpers\\Format\\HtmlspecialcharsViewHelper'); $actualResult = $this->escapeInterceptor->process($mockNode, $interceptorPosition, $this->mockParsingState); $this->assertInstanceOf('TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\ViewHelperNode', $actualResult); }