/**
  * @test
  * @author Bastian Waidelich <*****@*****.**>
  */
 public function getPartialSourceReturnsContentOfDefaultPartialFileIfNoPartialExistsForTheSpecifiedFormat()
 {
     $partialRootPath = dirname(__FILE__) . '/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);
 }
Пример #2
0
 protected function showUploadedPictures($albumName, array $pictures)
 {
     $this->_view->setTemplatePathAndFilename($this->_templatesPath . 'uploaded.html');
     $this->_view->assign('album', $this->_client->getAlbumByName($album));
     $this->_view->assign('pictures', $pictures);
 }
Пример #3
0
 protected function showAlbumAction($albumName)
 {
     $jsPath = t3lib_extMgm::extRelPath($this->extKey) . 'res/js/';
     $headerData = '<link rel="stylesheet" href="' . $jsPath . 'fancybox/jquery.fancybox-1.3.4.css" type="text/css"charset="utf-8" />' . "\n";
     if ($this->_conf['jQuery']) {
         $headerData .= '<script src="' . $jsPath . 'jquery-1.6.1.min.js" type="text/javascript"></script>' . "\n";
     }
     $headerData .= '<script src="' . $jsPath . 'fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>' . "\n" . '<script src="' . $jsPath . 'album.js" type="text/javascript"></script>' . "\n";
     $GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = $headerData;
     $album = $this->_client->getAlbumByName($albumName);
     $photos = $this->_client->getAlbumPhotos($albumName);
     $this->_view->setTemplatePathAndFilename($this->_templatesPath . 'album.html');
     $this->_view->assign('album', $album);
     $this->_view->assign('photos', $photos);
 }