Exemplo n.º 1
0
 /**
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function pathToPartialIsResolvedCorrectly()
 {
     $this->markTestSkipped('Needs to be finished');
     vfsStreamWrapper::register();
     mkdir('vfs://MyTemplates');
     file_put_contents('vfs://MyTemplates/MyCoolAction.html', 'contentsOfMyCoolAction');
     $mockRootDirectory = vfsStreamDirectory::create('ExamplePackagePath/Resources/Private/Partials');
     $mockRootDirectory->getChild('Resources/Private/Partials')->addChild('Partials');
     vfsStreamWrapper::setRoot($mockRootDirectory);
     $this->getAccessibleMock('Tx_Fluid_Core_Parser_TemplateParser', array(''), array(), '', FALSE);
 }
 /**
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function pathToPartialIsResolvedCorrectly()
 {
     $this->markTestSkipped('Needs proper implementation.');
     $mockRequest = $this->getMock('F3\\FLOW3\\MVC\\Request', array('getControllerPackageKey', ''));
     $mockRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue('DummyPackageKey'));
     $mockControllerContext = $this->getMock('F3\\FLOW3\\MVC\\Controller\\Context', array('getRequest'));
     $mockControllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($mockRequest));
     $mockPackage = $this->getMock('F3\\FLOW3\\Package\\PackageInterface', array('getPackagePath'));
     $mockPackage->expects($this->any())->method('getPackagePath')->will($this->returnValue('/ExamplePackagePath/'));
     $mockPackageManager = $this->getMock('F3\\FLOW3\\Package\\PackageManagerInterface', array('getPackage'));
     $mockPackageManager->expects($this->any())->method('getPackage')->with('DummyPackageKey')->will($this->returnValue($mockPackage));
     \vfsStreamWrapper::register();
     $mockRootDirectory = vfsStreamDirectory::create('ExamplePackagePath/Resources/Private/Partials');
     $mockRootDirectory->getChild('Resources/Private/Partials')->addChild('Partials');
     \vfsStreamWrapper::setRoot($mockRootDirectory);
     $this->getMock($this->buildAccessibleProxy('F3\\Fluid\\Core\\Parser\\TemplateParser'), array(''), array(), '', FALSE);
 }