Skip to content

Commit 22546a3

Browse files
committed
Correcting connection existence in tearDown operations
1 parent efa058b commit 22546a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/Doctrine/Tests/OrmFunctionalTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,13 @@ protected function useModelSet($setName)
308308
*/
309309
protected function tearDown()
310310
{
311+
$conn = static::$_sharedConn;
312+
311313
// In case test is skipped, tearDown is called, but no setup may have run
312314
if ( ! $conn) {
313315
return;
314316
}
315317

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

319320
$this->_sqlLoggerStack->enabled = false;

0 commit comments

Comments
 (0)