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:
authorMatthieu Napoli <matthieu@mnapoli.fr>2015-06-23 11:55:26 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-08-12 12:40:57 +0300
commit703a80db710f5c6a461b3dd4b8fb0630d473571d (patch)
treee60df4f2d3a8e21f4b15cc0d8cc671479a2bfc37 /tests/PHPUnit/Fixtures
parentc9cffd97f7a1f9764f8f5f18e3b6029a38cc5f9e (diff)
Fix tests and fixtures to work with an http host different than localhost
Diffstat (limited to 'tests/PHPUnit/Fixtures')
-rw-r--r--tests/PHPUnit/Fixtures/SqlDump.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/PHPUnit/Fixtures/SqlDump.php b/tests/PHPUnit/Fixtures/SqlDump.php
index 97f0ac40c2..b360d162b3 100644
--- a/tests/PHPUnit/Fixtures/SqlDump.php
+++ b/tests/PHPUnit/Fixtures/SqlDump.php
@@ -59,9 +59,10 @@ class SqlDump extends Fixture
// load the data into the correct database
$user = Config::getInstance()->database['username'];
$password = Config::getInstance()->database['password'];
+ $host = Config::getInstance()->database['host'];
Config::getInstance()->database['tables_prefix'] = $this->tablesPrefix;
- $cmd = "mysql -u \"$user\" \"--password=$password\" {$this->dbName} < \"" . $deflatedDumpPath . "\" 2>&1";
+ $cmd = "mysql -h \"$host\" -u \"$user\" \"--password=$password\" {$this->dbName} < \"" . $deflatedDumpPath . "\" 2>&1";
exec($cmd, $output, $return);
if ($return !== 0) {
throw new Exception("Failed to load sql dump: " . implode("\n", $output));
@@ -81,11 +82,6 @@ class SqlDump extends Fixture
$this->getTestEnvironment()->save();
}
- public function tearDown()
- {
- // empty
- }
-
/**
* maybe this could use downloadAndUnzip(self::$geoLiteCityDbUrl, $geoIpOutputDir, 'GeoIPCity.dat');
*