40 protected function setUp()
43 $shell = $this->createMock(Shell::class);
46 ->disableOriginalConstructor()->getMock();
47 $this->tempDir =
'/temp/dir';
68 $this->assertEquals($this->tempDir, $this->subject->getTempDir(),
'Temp directory is not set in Application');
70 $initParams = $this->subject->getInitParams();
71 $this->assertInternalType(
'array', $initParams,
'Wrong initialization parameters type');
72 $this->assertArrayHasKey(
75 'Directories are not configured' 77 $this->assertArrayHasKey(
State::PARAM_MODE, $initParams,
'Application mode is not configured');
81 'Wrong application mode configured' 92 public function testPartialLoadArea(
string $areaCode)
94 $configScope = $this->getMockBuilder(Scope::class)
95 ->disableOriginalConstructor()
97 $configScope->expects($this->once())
98 ->method(
'setCurrentScope')
99 ->with($this->identicalTo($areaCode));
101 $configLoader = $this->getMockBuilder(ConfigLoader::class)
102 ->disableOriginalConstructor()
104 $configLoader->expects($this->once())
106 ->with($this->identicalTo($areaCode))
109 $area = $this->getMockBuilder(Area::class)
110 ->disableOriginalConstructor()
112 $area->expects($this->once())
116 $areaList = $this->getMockBuilder(AreaList::class)
117 ->disableOriginalConstructor()
119 $areaList->expects($this->once())
121 ->with($this->identicalTo($areaCode))
125 $objectManager = $this->getMockBuilder(ObjectManagerInterface::class)
126 ->disableOriginalConstructor()
129 ->method(
'configure')
130 ->with($this->identicalTo([]));
133 ->willReturnOnConsecutiveCalls(
141 $this->subject->loadArea($areaCode);
const INIT_PARAM_FILESYSTEM_DIR_PATHS
if(!file_exists($installConfigFile)) if(!defined('TESTS_INSTALLATION_DB_CONFIG_FILE')) $shell
partialLoadAreaDataProvider()
static setObjectManager(\Magento\Framework\ObjectManagerInterface $objectManager)