Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ThemeUninstallTest.php
Go to the documentation of this file.
1 <?php
7 
9 
10 class ThemeUninstallTest extends \PHPUnit\Framework\TestCase
11 {
12  public function testUninstall()
13  {
14  $themeUninstaller = $this->createMock(\Magento\Theme\Model\Theme\ThemeUninstaller::class);
15  $themePackageInfo = $this->createMock(\Magento\Theme\Model\Theme\ThemePackageInfo::class);
16  $output =
17  $this->getMockForAbstractClass(\Symfony\Component\Console\Output\OutputInterface::class, [], '', false);
18  $themePackageInfo->expects($this->once())->method('getFullThemePath')->willReturn('theme/path');
19  $themeUninstaller->expects($this->once())->method('uninstallRegistry')->with($output, ['theme/path']);
20  $themeUninstall = new ThemeUninstall($themeUninstaller, $themePackageInfo);
21  $themeUninstall->uninstall($output, 'vendor/package-theme');
22  }
23 }