Esempio n. 1
0
 /**
  * Create instance of theme based on name and settings
  *
  * @param string $name
  * @param array $settings
  * @return Theme
  */
 protected function createTheme($name, array $settings)
 {
     $result = new Theme($name);
     if (isset($settings['styles'])) {
         $result->setStyles((array) $settings['styles']);
     }
     if (isset($settings['label'])) {
         $result->setLabel($settings['label']);
     }
     if (isset($settings['icon'])) {
         $result->setIcon($settings['icon']);
     }
     if (isset($settings['logo'])) {
         $result->setLogo($settings['logo']);
     }
     if (isset($settings['screenshot'])) {
         $result->setScreenshot($settings['screenshot']);
     }
     return $result;
 }
Esempio n. 2
0
 public function testStylesMethods()
 {
     $this->assertEquals(array(), $this->theme->getStyles());
     $this->theme->setStyles(array('styles.png'));
     $this->assertEquals(array('styles.png'), $this->theme->getStyles());
 }