Commit 16be5491 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #2638 from deeky666/tear-down-active-transactions

Tear down active transactions in functional test cases
parents f92d3f49 4f1f1765
......@@ -19,6 +19,8 @@ class PortabilityTest extends \Doctrine\Tests\DbalFunctionalTestCase
if ($this->portableConnection) {
$this->portableConnection->close();
}
parent::tearDown();
}
/**
......
......@@ -25,6 +25,8 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTemporaryTableSQL($tempTable));
} catch(\Exception $e) { }
}
parent::tearDown();
}
/**
......
......@@ -41,6 +41,8 @@ class DBAL630Test extends \Doctrine\Tests\DbalFunctionalTestCase
$this->_conn->getWrappedConnection()->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, false);
}
}
parent::tearDown();
}
public function testBooleanConversionSqlLiteral()
......
......@@ -40,6 +40,13 @@ class DbalFunctionalTestCase extends DbalTestCase
$this->_conn->getConfiguration()->setSQLLogger($this->_sqlLoggerStack);
}
protected function tearDown()
{
while ($this->_conn->isTransactionActive()) {
$this->_conn->rollBack();
}
}
protected function onNotSuccessfulTest($e)
{
if ($e instanceof \PHPUnit_Framework_AssertionFailedError) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment