public function testRunBootstrapEnvironment() { $this->_injectApplicationMock(); $this->_envBootstrap->expects($this->once())->method('emulateHttpRequest')->with($this->identicalTo($_SERVER)); $this->_envBootstrap->expects($this->once())->method('emulateSession')->with($this->identicalTo(isset($_SESSION) ? $_SESSION : null)); $this->_object->runBootstrap(); }
public function testRunBootstrap() { $this->_envBootstrap->expects($this->once())->method('emulateHttpRequest')->with($this->identicalTo($_SERVER)); $this->_envBootstrap->expects($this->once())->method('emulateSession')->with($this->identicalTo(isset($_SESSION) ? $_SESSION : null)); $memUsageLimit = '100B'; $memLeakLimit = '60B'; $settingsMap = [['TESTS_MEM_USAGE_LIMIT', 0, $memUsageLimit], ['TESTS_MEM_LEAK_LIMIT', 0, $memLeakLimit]]; $this->_settings->expects($this->any())->method('get')->will($this->returnValueMap($settingsMap)); $memoryBootstrap = $this->getMock('Magento\\TestFramework\\Bootstrap\\Memory', ['activateStatsDisplaying', 'activateLimitValidation'], [], '', false); $memoryBootstrap->expects($this->once())->method('activateStatsDisplaying'); $memoryBootstrap->expects($this->once())->method('activateLimitValidation'); $this->memoryFactory->expects($this->once())->method('create')->with($memUsageLimit, $memLeakLimit)->will($this->returnValue($memoryBootstrap)); $this->_docBlockBootstrap->expects($this->once())->method('registerAnnotations')->with($this->isInstanceOf('Magento\\TestFramework\\Application')); $this->_profilerBootstrap->expects($this->never())->method($this->anything()); $this->_object->runBootstrap(); }