/** * Get theme model by theme path and area code * * @param string $themePath * @param string $areaCode * @return \Magento\Framework\View\Design\ThemeInterface */ public function getThemeModel($themePath, $areaCode) { if ($this->appState->isInstalled()) { $themeModel = $this->flyweightFactory->create($themePath, $areaCode); } else { $themeModel = $this->themeList->getThemeByFullPath($areaCode . '/' . $themePath); } return $themeModel; }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Incorrect theme identification key */ public function testNegativeCreate() { $this->factory->create(null); }