diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index 611f357e856..f705ba0ea40 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -308,6 +308,11 @@ protected function useModelSet($setName) */ protected function tearDown() { + // In case test is skipped, tearDown is called, but no setup may have run + if ( ! $conn) { + return; + } + $conn = static::$_sharedConn; $platform = $conn->getDatabasePlatform();