diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index f705ba0ea40..fddb2c42a6d 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -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;