From 8600789b55f33c8d6cd42d0e117e83dedf245b96 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Wed, 18 Oct 2023 23:55:55 +0300 Subject: [PATCH] fix cakephp 4.5 deprecations --- src/TestSuite/Fixture/FixtureInjector.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TestSuite/Fixture/FixtureInjector.php b/src/TestSuite/Fixture/FixtureInjector.php index b3b475b..c3bdb27 100644 --- a/src/TestSuite/Fixture/FixtureInjector.php +++ b/src/TestSuite/Fixture/FixtureInjector.php @@ -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(); } @@ -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(); }