Exemple #1
0
 public function createView()
 {
     $view = new TemplateView();
     $paths = new \TYPO3Fluid\Docs\Fluid\TemplatePaths();
     $view->getRenderingContext()->setTemplatePaths($paths);
     $paths->setLayoutRootPaths(array(__DIR__ . '/../Layouts/'));
     $paths->setPartialRootPaths(array(__DIR__ . '/../Partials/'));
     $view->getRenderingContext()->getViewHelperResolver()->addNamespace('d', 'TYPO3Fluid\\Docs\\ViewHelpers');
     $view->getRenderingContext()->setTemplateProcessors(array(new \TYPO3Fluid\Docs\TemplateProcessor\CodeTemplateProcessor()));
     return $view;
 }
 /**
  * If your test case requires a custom View instance
  * return the instance from this method.
  *
  * @return ViewInterface
  */
 protected function getView($withCache = FALSE)
 {
     $view = new TemplateView();
     $cache = $this->getCache();
     if ($cache && $withCache) {
         $view->getRenderingContext()->setCache($cache);
     }
     return $view;
 }