Esempio n. 1
0
 /**
  * Test current theme from plugin paths.
  *
  * @return void
  */
 public function testCurrentThemePluginPath()
 {
     $themeName = 'Site';
     Configure::write('Theme.site', $themeName);
     $path = $this->_paths[0] . $themeName . Theme::POSTFIX;
     $this->_folder->create($path);
     $name = Theme::get(new Request());
     $this->_folder->delete($path);
     $this->assertSame($themeName, Configure::read('Theme.site'));
     $this->assertSame($themeName, $name);
 }
Esempio n. 2
0
 /**
  * Setup application theme.
  *
  * @return void
  */
 protected function _setTheme()
 {
     $theme = Theme::get($this->request);
     $this->viewBuilder()->theme($theme);
 }