Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ThemeDependencyCheckerFactoryTest.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class ThemeDependencyCheckerFactoryTest extends \PHPUnit\Framework\TestCase
12 {
16  private $themeDependencyCheckerFactory;
17 
21  private $objectManagerProvider;
22 
26  private $objectManager;
27 
28  public function setUp()
29  {
30  $this->objectManagerProvider = $this->createMock(\Magento\Setup\Model\ObjectManagerProvider::class);
31  $this->objectManager = $this->getMockForAbstractClass(
32  \Magento\Framework\ObjectManagerInterface::class,
33  [],
34  '',
35  false
36  );
37  }
38 
39  public function testCreate()
40  {
41  $this->objectManagerProvider->expects($this->once())->method('get')->willReturn($this->objectManager);
42  $this->objectManager->expects($this->once())
43  ->method('get')
44  ->with(\Magento\Theme\Model\Theme\ThemeDependencyChecker::class);
45  $this->themeDependencyCheckerFactory = new ThemeDependencyCheckerFactory($this->objectManagerProvider);
46  $this->themeDependencyCheckerFactory->create();
47  }
48 }