/** * Use this method only with database isolation * * @return \Magento\Theme\Model\Theme */ protected function _getTestTheme() { $theme = $this->_theme->getCollection()->getThemeByFullPath(implode(\Magento\Framework\View\Design\ThemeInterface::PATH_SEPARATOR, ['frontend', 'Test/test_theme'])); $this->assertNotEmpty($theme->getId()); return $theme; }