public function add(Theme $theme, $parentName = '') { $theme->addParent($parentName ? $this->find($parentName) : $this->root); return $theme; }
public function testSetTheme() { $themes = new Themes(); $theme1 = new Theme('theme1'); $theme2 = new Theme('theme2'); $themes->add($theme1); $themes->add($theme2); $themes->set('theme1'); $this->assertEquals('theme1', $themes->get()); }