Neos\FluidAdaptor\Tests\Unit\Core\Parser\Interceptor\ResourceInterceptorTest::resourcesInCssUrlsAreReplacedCorrectly PHP Method

resourcesInCssUrlsAreReplacedCorrectly() public method

    public function resourcesInCssUrlsAreReplacedCorrectly()
    {
        $originalText1 = '<style type="text/css">
			#loginscreen {
				height: 768px;
				background-image: url(';
        $originalText2 = '../../../../Public/Backend/Media/Images/Login/MockLoginScreen.png';
        $path = 'Backend/Media/Images/Login/MockLoginScreen.png';
        $originalText3 = ')
				background-repeat: no-repeat;
			}';
        $originalText = $originalText1 . $originalText2 . $originalText3;
        $mockTextNode = $this->getMockBuilder(TextNode::class)->setMethods(array('evaluateChildNodes'))->setConstructorArgs(array($originalText))->getMock();
        $this->assertEquals($originalText, $mockTextNode->evaluate($this->createMock(RenderingContextInterface::class)));
        $interceptor = new ResourceInterceptor();
        $resultingNodeTree = $interceptor->process($mockTextNode, InterceptorInterface::INTERCEPT_TEXT, $this->createMock(ParsingState::class));
        $this->assertInstanceOf(RootNode::class, $resultingNodeTree);
        $this->assertCount(3, $resultingNodeTree->getChildNodes());
        foreach ($resultingNodeTree->getChildNodes() as $parserNode) {
            if ($parserNode instanceof ResourceUriNode) {
                $this->assertEquals(['path' => $path], $parserNode->getArguments());
            }
        }
    }