예제 #1
0
 /**
  * @test
  */
 public function renderLoadsSpecifiedTemplateFileAndPassesSourceToTemplateParser()
 {
     $templatePathAndFilename = __DIR__ . '/Fixtures/StandaloneViewFixture.html';
     $expectedResult = file_get_contents($templatePathAndFilename);
     $this->view->setTemplatePathAndFilename($templatePathAndFilename);
     $this->mockTemplateParser->expects($this->once())->method('parse')->with($expectedResult);
     $this->view->render();
 }
예제 #2
0
 /**
  * @test
  */
 public function renderLoadsSpecifiedTemplateFileAndPassesSourceToTemplateParser()
 {
     $templatePathAndFilename = GeneralUtility::fixWindowsFilePath(__DIR__) . '/Fixtures/StandaloneViewFixture.html';
     $expectedResult = file_get_contents($templatePathAndFilename);
     $this->view->setTemplatePathAndFilename($templatePathAndFilename);
     $this->view->expects($this->once())->method('testFileExistence')->with($templatePathAndFilename)->will($this->returnValue(true));
     $this->mockTemplateParser->expects($this->once())->method('parse')->with($expectedResult);
     $this->view->render();
 }