Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored and bburnichon committed Jun 16, 2016
1 parent 0e187bc commit fcc65f3
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Doctrine\Common\EventManager;
use Doctrine\DBAL\Events;
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\Comparator;
Expand Down Expand Up @@ -51,10 +52,19 @@ public function testDropsDatabaseWithActiveConnections()

$this->_sm->dropAndCreateDatabase('test_drop_database');

$this->assertContains('test_drop_database', $this->_sm->listDatabases());
$knownDatabases = $this->_sm->listDatabases();
if ($this->_conn->getDatabasePlatform() instanceof OraclePlatform) {
$this->assertContains('TEST_DROP_DATABASE', $knownDatabases);
} else {
$this->assertContains('test_drop_database', $knownDatabases);
}

$params = $this->_conn->getParams();
$params['dbname'] = 'test_drop_database';
if ($this->_conn->getDatabasePlatform() instanceof OraclePlatform) {
$params['user'] = 'test_drop_database';
} else {
$params['dbname'] = 'test_drop_database';
}

$user = isset($params['user']) ? $params['user'] : null;
$password = isset($params['password']) ? $params['password'] : null;
Expand All @@ -63,11 +73,11 @@ public function testDropsDatabaseWithActiveConnections()

$this->assertInstanceOf('Doctrine\DBAL\Driver\Connection', $connection);

unset($connection);

$this->_sm->dropDatabase('test_drop_database');

$this->assertNotContains('test_drop_database', $this->_sm->listDatabases());

unset($connection);
}

/**
Expand Down

0 comments on commit fcc65f3

Please sign in to comment.