Skip to content

Commit

Permalink
Correcting connection existence in tearDown operations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Aug 11, 2017
1 parent efa058b commit 22546a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Doctrine/Tests/OrmFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,13 @@ protected function useModelSet($setName)
*/
protected function tearDown()
{
$conn = static::$_sharedConn;

// In case test is skipped, tearDown is called, but no setup may have run
if ( ! $conn) {
return;
}

$conn = static::$_sharedConn;
$platform = $conn->getDatabasePlatform();

$this->_sqlLoggerStack->enabled = false;
Expand Down

0 comments on commit 22546a3

Please sign in to comment.