/**
  * @test
  */
 public function setPartialRootPathsOverridesValueSetBySetPartialRootPath()
 {
     $this->view->setPartialRootPath('/foo/bar');
     $this->view->setPartialRootPaths(array('/overruled/path'));
     $expected = array('/overruled/path');
     $actual = $this->view->_call('getPartialRootPaths');
     $this->assertEquals($expected, $actual, 'A set partial root path was not returned correctly.');
 }
 /**
  * Set partial root path if given in configuration
  *
  * @param array $conf Configuration array
  * @return void
  */
 protected function setPartialRootPath(array $conf)
 {
     $partialRootPath = isset($conf['partialRootPath.']) ? $this->cObj->stdWrap($conf['partialRootPath'], $conf['partialRootPath.']) : $conf['partialRootPath'];
     if ($partialRootPath) {
         $partialRootPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($partialRootPath);
         $this->view->setPartialRootPath($partialRootPath);
     }
 }
 /**
  * @test
  */
 public function getPartialSourceReturnsContentOfDefaultPartialFileIfNoPartialExistsForTheSpecifiedFormat()
 {
     $partialRootPath = __DIR__ . '/Fixtures';
     $this->view->setPartialRootPath($partialRootPath);
     $this->mockRequest->expects($this->once())->method('getFormat')->will($this->returnValue('foo'));
     $expectedResult = file_get_contents($partialRootPath . '/LayoutFixture');
     $actualResult = $this->view->_call('getPartialSource', 'LayoutFixture');
     $this->assertEquals($expectedResult, $actualResult);
 }