You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I previously used a test inside my ancestor test class constructor:
if(!$this->em->getConnection()->isTransactionActive())
$this->fail("No active transaction ! you could lost data !\n");
But it seems to not work with lasts versions.
I made another test by looking in Connection params.
I try to get the driver class, but because the wrapperDriver is private I'm not able to test it's class, despite my debugger is able to see it :
Is there a better solution ?
The text was updated successfully, but these errors were encountered:
Because I already have the issue of the tests were running without transaction (the bundle was somehow been disabled) and I don't want this could append again.
/** @var \PDO $connection */$connection = $this->em->getConnection()->getNativeConnection();
if(!$connection->inTransaction()) {
$this->fail("No active transaction ! you could lost data !\n");
}
Hello,
I previously used a test inside my ancestor test class constructor:
if(!$this->em->getConnection()->isTransactionActive())
$this->fail("No active transaction ! you could lost data !\n");
But it seems to not work with lasts versions.
I made another test by looking in Connection params.
I try to get the driver class, but because the wrapperDriver is private I'm not able to test it's class, despite my debugger is able to see it :
Is there a better solution ?
The text was updated successfully, but these errors were encountered: