That means you can build your template so that it can be previewed as is and pointers to CSS, JS, images, ... will still work when the resources are mirrored by Flow. Currently the supported URIs are of the form [../]Public/Some/ (will use current package) [../]/Resources/Public/ (will use given package)
Inheritance: implements TYPO3Fluid\Fluid\Core\Parser\InterceptorInterface
コード例 #1
0
 /**
  * @dataProvider supportedUrls
  * @test
  */
 public function supportedUrlsAreDetected($part1, $part2, $part3, $expectedPath, $expectedPackageKey)
 {
     $originalText = $part1 . $part2 . $part3;
     $mockTextNode = $this->getMockBuilder(TextNode::class)->setMethods(array('evaluateChildNodes'))->setConstructorArgs(array($originalText))->getMock();
     $this->assertEquals($originalText, $mockTextNode->evaluate($this->createMock(RenderingContextInterface::class)));
     $interceptor = new ResourceInterceptor();
     $interceptor->setDefaultPackageKey('Acme.Demo');
     $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' => $expectedPath, 'package' => $expectedPackageKey], $parserNode->getArguments());
         }
     }
 }