/** * Theme registration * * @param string $pathPattern * @return $this */ public function register($pathPattern = '') { if (empty($pathPattern)) { $this->_themeCollection->addDefaultPattern('*'); } else { $this->_themeCollection->addTargetPattern($pathPattern); } foreach ($this->_themeCollection as $theme) { $this->_registerThemeRecursively($theme); } $this->checkPhysicalThemes()->checkAllowedThemeRelations(); return $this; }
/** * Load from configuration * * @dataProvider expectedThemeDataFromConfiguration */ public function testLoadFromConfiguration($themePath, $expectedData) { $theme = $this->_model->addTargetPattern($themePath)->getFirstItem(); $this->assertEquals($expectedData, $theme->getData()); }