From efa058bd8f325ae37063b2b6b674b0d9e059adba Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Aug 2017 22:56:02 +0200 Subject: [PATCH] If no connection was enstablished, skip the `tearDown` operations --- tests/Doctrine/Tests/OrmFunctionalTestCase.php | 5 +++++ 1 file changed, 5 insertions(+) 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();