public function testContructorOfInitializerShouldSupportDefaultStoreAndScope()
 {
     // prepare
     $initializer = new MagentoInitializer($this->_target);
     // act
     $initializer->initialize();
     // assert
     Helper::assertRunParametersIsCorrect($this->_target, $this->_magento);
 }
 protected function tearDown()
 {
     Helper::delete($this->_target);
     Helper::delete($this->_source);
 }
 public function testShouldCleanupTargetIfErrorOccuredDuringInstallation()
 {
     // prepare
     Helper::emulateMagentoFileStructure($this->_magento);
     $installer = new MagentoWithMockedRun($this->_target, $this->_magento, self::DB_HOSTNAME, self::DB_USERNAME, self::DB_PASSWORD, self::DB_NAME, 'url');
     $installer->setThrowExceptionFromInstall(true);
     // act
     try {
         $installer->install();
     } catch (MyException $e) {
     }
     // assert
     $this->assertFalse($installer->isInstalled());
     foreach (new \DirectoryIterator($this->_target) as $item) {
         if (!$item->isDot()) {
             $this->fail('Target is not empty.');
         }
     }
 }