From 22546a381144a957c00f17dc428ca33bc48ddecd Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Aug 2017 23:28:20 +0200 Subject: [PATCH] Correcting connection existence in tearDown operations --- tests/Doctrine/Tests/OrmFunctionalTestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;