public function testGetFullThemePathNonExist() { $this->componentRegistrar->expects($this->once())->method('getPaths')->willReturn(['themeA' => 'path/to/A']); $this->dirRead->expects($this->once())->method('isExist')->willReturn(true); $this->dirRead->expects($this->once())->method('readFile')->willReturn('{"name": "package"}'); $this->assertEquals('', $this->themePackageInfo->getFullThemePath('package-other')); }
/** * Check theme by package name(s) if has child virtual and physical theme * * @param string[] $packages * @return string[] */ public function checkChildThemeByPackagesName($packages) { $themePaths = []; foreach ($packages as $package) { $themePath = $this->themePackageInfo->getFullThemePath($package); if ($themePath) { $themePaths[] = $themePath; } } if ($themePaths) { return $this->checkChildTheme($themePaths); } return []; }
/** * Perform setup side uninstall * * @param OutputInterface $output * @param string $componentName * @return void */ public function uninstall(OutputInterface $output, $componentName) { $themePath = $this->themePackageInfo->getFullThemePath($componentName); $this->themeUninstaller->uninstallRegistry($output, [$themePath]); }