Skip to content

Commit

Permalink
fix cakephp 4.5 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Oct 18, 2023
1 parent 31a01a6 commit 8600789
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/TestSuite/Fixture/FixtureInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ public function endTestSuite(TestSuite $suite): void
*/
private function __loadDatabase($ds, $database)
{
if ($ds->isConnected()) {
if ($ds->getDriver()->isConnected()) {
// attempt to disconnect and close connection to db.
$ds->disconnect();
$ds->getDriver()->disconnect();
$ds->close();
}

Expand All @@ -208,10 +208,10 @@ private function __loadDatabase($ds, $database)
$this->databaseLoaded = true;
}

if (!$ds->isConnected()) {
if (!$ds->getDriver()->isConnected()) {
// reconnect
$ds->disconnect();
$ds->connect();
$ds->getDriver()->disconnect();
$ds->getDriver()->connect();
}


Expand Down

0 comments on commit 8600789

Please sign in to comment.