From 32d2c2c8b1169214832cdee137112f1dcdb2f72d Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Mon, 23 Jul 2018 23:33:33 +0200 Subject: [PATCH] * [MOD] Unit testing. Work in progress --- test/SP/Services/Install/DbTestUtilTrait.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/SP/Services/Install/DbTestUtilTrait.php b/test/SP/Services/Install/DbTestUtilTrait.php index 62cca7a7..3d6da864 100644 --- a/test/SP/Services/Install/DbTestUtilTrait.php +++ b/test/SP/Services/Install/DbTestUtilTrait.php @@ -78,13 +78,15 @@ trait DbTestUtilTrait /** * @param $user * @param $host - * - * @throws \SP\Storage\Database\DatabaseException */ private function dropUser($user, $host) { - $this->getConnection() - ->query(sprintf('DROP USER IF EXISTS \'%s\'@\'%s\'', $user, $host)); + try { + $this->getConnection() + ->query(sprintf('DROP USER \'%s\'@\'%s\'', $user, $host)); + } catch (\Exception $e) { + processException($e); + } } /**