From 60cf8148ed4cd26293537b50f8429918dca6a1c1 Mon Sep 17 00:00:00 2001 From: MBoretto Date: Sun, 13 Mar 2016 11:26:46 +0100 Subject: [PATCH] change delete in order to avoid integrity constraint --- tests/TestHelpers.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/TestHelpers.php b/tests/TestHelpers.php index f935cd371..4ca1b4cfd 100644 --- a/tests/TestHelpers.php +++ b/tests/TestHelpers.php @@ -186,16 +186,16 @@ public static function emptyDB(array $credentials) $pdo = new \PDO($dsn, $credentials['user'], $credentials['password'], $options); $pdo->prepare(' DELETE FROM `conversation`; + DELETE FROM `telegram_update`; + DELETE FROM `chosen_inline_query`; + DELETE FROM `inline_query`; DELETE FROM `message`; DELETE FROM `user_chat`; - DELETE FROM `user`; DELETE FROM `chat`; - DELETE FROM `chosen_inline_query`; - DELETE FROM `inline_query`; - DELETE FROM `telegram_update`; + DELETE FROM `user`; ')->execute(); } catch (\Exception $e) { - //Ignore... + throw new TelegramException($e->getMessage()); } } }