public function testCleanupDb()
 {
     $this->config->expects($this->once())->method('get')->with(ConfigOptionsListConstants::CONFIG_PATH_DB_CONNECTION_DEFAULT)->willReturn(self::$dbConfig);
     $this->connection->expects($this->at(0))->method('quoteIdentifier')->with('magento')->willReturn('`magento`');
     $this->connection->expects($this->at(1))->method('query')->with('DROP DATABASE IF EXISTS `magento`');
     $this->connection->expects($this->at(2))->method('query')->with('CREATE DATABASE IF NOT EXISTS `magento`');
     $this->logger->expects($this->once())->method('log')->with('Cleaning up database `magento`');
     $this->object->cleanupDb();
 }
 public function testCleanupDb()
 {
     $this->config->expects($this->once())->method('isAvailable')->willReturn(true);
     $this->config->expects($this->once())->method('getSegment')->with(DbConfig::CONFIG_KEY)->willReturn(self::$dbConfig);
     $this->connection->expects($this->at(0))->method('quoteIdentifier')->with('magento')->willReturn('`magento`');
     $this->connection->expects($this->at(1))->method('query')->with('DROP DATABASE IF EXISTS `magento`');
     $this->connection->expects($this->at(2))->method('query')->with('CREATE DATABASE IF NOT EXISTS `magento`');
     $this->logger->expects($this->once())->method('log')->with('Recreating database `magento`');
     $this->object->cleanupDb();
 }