public function testGetters()
 {
     $key = 'area/Vendor/name';
     $path = 'path';
     $object = new ThemePackage($key, $path);
     $this->assertSame('area', $object->getArea());
     $this->assertSame('Vendor', $object->getVendor());
     $this->assertSame('name', $object->getName());
     $this->assertSame($key, $object->getKey());
     $this->assertSame($path, $object->getPath());
 }
Ejemplo n.º 2
0
 /**
  * Return configuration model for the theme
  *
  * @param ThemePackage $themePackage
  * @return \Magento\Framework\Config\Theme
  */
 protected function _getConfigModel($themePackage)
 {
     $themeDir = $this->dirReadFactory->create($themePackage->getPath());
     if ($themeDir->isExist('theme.xml')) {
         $configContent = $themeDir->readFile('theme.xml');
     } else {
         $configContent = '';
     }
     return $this->themeConfigFactory->create(['configContent' => $configContent]);
 }