Skip to content

Commit

Permalink
Merge pull request #579 from cakephp/remove-pdo
Browse files Browse the repository at this point in the history
Remove unnecessary Connection pdo manipulation
  • Loading branch information
othercorey authored Oct 14, 2022
2 parents 1be4a10 + 88ca712 commit e1a0a76
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/TestCase/Command/Phinx/CacheBuildTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public function tearDown(): void
Cache::disable();
$this->connection->cacheMetadata(false);
$this->connection->execute('DROP TABLE IF EXISTS blog');
unset($this->connection, $this->command, $this->streamOutput);
}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/TestCase/Command/Phinx/CacheClearTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function tearDown(): void
Cache::disable();
$this->connection->cacheMetadata(false);
$this->connection->execute('DROP TABLE IF EXISTS blog');
unset($this->connection, $this->command, $this->streamOutput);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Command/Phinx/CreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();
unset($this->connection, $this->command, $this->streamOutput);

foreach ($this->generatedFiles as $file) {
if (file_exists($file)) {
unlink($file);
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase/Command/Phinx/DumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,10 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();

$this->connection->getDriver()->setConnection($this->pdo);
$this->connection->execute('DROP TABLE IF EXISTS phinxlog');
$this->connection->execute('DROP TABLE IF EXISTS numbers');
$this->connection->execute('DROP TABLE IF EXISTS letters');
$this->connection->execute('DROP TABLE IF EXISTS parts');
unset($this->connection, $this->command, $this->streamOutput);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Command/Phinx/MarkMigratedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,8 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();
$this->connection->getDriver()->setConnection($this->pdo);
$this->connection->execute('DROP TABLE IF EXISTS phinxlog');
$this->connection->execute('DROP TABLE IF EXISTS numbers');
unset($this->connection, $this->commandTester, $this->command);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions tests/TestCase/Command/Phinx/SeedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ public function setUp(): void
public function tearDown(): void
{
parent::tearDown();
$this->connection->getDriver()->setConnection($this->pdo);
$this->connection->execute('DROP TABLE IF EXISTS phinxlog');
$this->connection->execute('DROP TABLE IF EXISTS numbers');
unset($this->connection, $this->command, $this->streamOutput);
}

/**
Expand Down

0 comments on commit e1a0a76

Please sign in to comment.