예제 #1
0
 protected function setUp()
 {
     $this->_application = $this->getMock('Magento\\TestFramework\\Application', ['getTempDir', 'getInitParams', 'reinitialize', 'run'], [], '', false);
     $this->_bootstrap = $this->getMock('Magento\\TestFramework\\Bootstrap', ['getApplication', 'getDbVendorName'], [], '', false);
     $this->_bootstrap->expects($this->any())->method('getApplication')->will($this->returnValue($this->_application));
     $this->_object = new \Magento\TestFramework\Helper\Bootstrap($this->_bootstrap);
 }
예제 #2
0
 public function testRunBootstrapMemoryWatch()
 {
     $this->_injectApplicationMock(array('TESTS_MEM_USAGE_LIMIT' => 100, 'TESTS_MEM_LEAK_LIMIT' => 60));
     $this->_object->expects($this->once())->method('_createMemoryBootstrap')->with(100, 60)->will($this->returnValue($this->_memoryBootstrap));
     $this->_memoryBootstrap->expects($this->once())->method('activateStatsDisplaying');
     $this->_memoryBootstrap->expects($this->once())->method('activateLimitValidation');
     $this->_object->runBootstrap();
 }
예제 #3
0
 public function testGetDbVendorName()
 {
     $this->_bootstrap->expects($this->once())->method('getDbVendorName')->will($this->returnValue('mysql'));
     $this->assertEquals('mysql', $this->_object->getDbVendorName());
 }