Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2014-12-16 08:55:56 +0300
committerdiosmosis <benaka@piwik.pro>2014-12-16 09:03:19 +0300
commitc0f24c160ab2f573a06146c66fa7fc7bab97a3a7 (patch)
treea37ca2003ca6b53af474051a397c92037317e56e /tests/PHPUnit
parent589d519f6936d0998c23d8540f920edc8cbcc521 (diff)
Trying to fix strange travis error, make sure a database is selected in IntegrationTestCase::restoreDbTables.
Diffstat (limited to 'tests/PHPUnit')
-rwxr-xr-xtests/PHPUnit/Framework/TestCase/SystemTestCase.php5
m---------tests/PHPUnit/UI0
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
index 8b85f255aa..3c8061fef0 100755
--- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
@@ -528,6 +528,11 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
*/
protected static function restoreDbTables($tables)
{
+ $db = Db::fetchOne("SELECT DATABASE()");
+ if (empty($db)) {
+ Db::exec("USE " . Config::getInstance()->database_tests['dbname']);
+ }
+
DbHelper::truncateAllTables();
// insert data
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
-Subproject 87fee9b1024b1c03d5d5d66a4fb4f699231e8e5
+Subproject 4cdf80fc99025b71e5d8e59419d2af749e466df