From 860839e3b05cc08cbbe2021e8597dd4267025305 Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Mon, 29 Sep 2014 00:11:28 -0700 Subject: [PATCH] Use table prefix when truncating tables in DatabaseTestCase. --- tests/PHPUnit/IntegrationTestCase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 44d0abc2fd..4687cc534c 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -518,8 +518,10 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase */ protected static function restoreDbTables($tables) { + $tablesPrefix = Config::getInstance()->database_tests['tables_prefix']; + $existingTables = array(); - foreach (Db::fetchAll("SHOW TABLES LIKE '%'") as $row) { + foreach (Db::fetchAll("SHOW TABLES LIKE '$tablesPrefix%'") as $row) { $existingTables[] = reset($row); } -- GitLab