diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-09-30 10:11:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-09-30 16:05:47 +0400 |
commit | 494d826ab4874ea85d55ce7e47b432abe35a4a5d (patch) | |
tree | 82d65784b0a509539022d559a45754bcb2f1f208 /tests | |
parent | e2de21361ae1a858e3b339fdb3b040b0429dac4f (diff) |
Refs #4133
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Core/LogTest.php | 13 | ||||
-rw-r--r-- | tests/PHPUnit/Core/ServeStaticFileTest.php | 3 | ||||
m--------- | tests/PHPUnit/UI | 0 | ||||
-rwxr-xr-x | tests/travis/prepare.sh | 2 |
4 files changed, 14 insertions, 4 deletions
diff --git a/tests/PHPUnit/Core/LogTest.php b/tests/PHPUnit/Core/LogTest.php index 1ae78c63a3..e3c3cde4ae 100644 --- a/tests/PHPUnit/Core/LogTest.php +++ b/tests/PHPUnit/Core/LogTest.php @@ -65,7 +65,7 @@ dummy backtrace' parent::setUp(); Config::getInstance()->log['string_message_format'] = self::STRING_MESSAGE_FORMAT; - Config::getInstance()->log['logger_file_path'] = self::getLogFileLocation(); + Config::getInstance()->log['logger_file_path'] = self::getDefaultLogFileLocation(); @unlink(self::getLogFileLocation()); Log::clearInstance(); Error::$debugBacktraceForTests = ExceptionHandler::$debugBacktraceForTests = "dummy backtrace"; @@ -258,6 +258,15 @@ dummy backtrace' public static function getLogFileLocation() { - return PIWIK_INCLUDE_PATH . '/tmp/logs/piwik.test.log'; + $path = self::getDefaultLogFileLocation(); + $path = \Piwik\SettingsPiwik::rewriteTmpPathWithHostname($path); + return $path; } + + protected static function getDefaultLogFileLocation() + { + $path = PIWIK_INCLUDE_PATH . '/tmp/logs/piwik.test.log'; + return $path; + } + }
\ No newline at end of file diff --git a/tests/PHPUnit/Core/ServeStaticFileTest.php b/tests/PHPUnit/Core/ServeStaticFileTest.php index 40a65b02da..0776f1c9aa 100644 --- a/tests/PHPUnit/Core/ServeStaticFileTest.php +++ b/tests/PHPUnit/Core/ServeStaticFileTest.php @@ -477,7 +477,8 @@ class Test_Piwik_ServeStaticFile extends PHPUnit_Framework_TestCase private function getCompressedFileLocation() { - return PIWIK_PATH_TEST_TO_ROOT . Piwik::COMPRESSED_FILE_LOCATION . basename(TEST_FILE_LOCATION); + $path = PIWIK_PATH_TEST_TO_ROOT . \Piwik\AssetManager::COMPRESSED_FILE_LOCATION . basename(TEST_FILE_LOCATION); + return \Piwik\SettingsPiwik::rewriteTmpPathWithHostname($path); } private function removeCompressedFiles() diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI -Subproject a209d62a45911770c655f879f546a15348bdcaf +Subproject 8b7ead59986b18d2bbc4e0fd097838e5237490f diff --git a/tests/travis/prepare.sh b/tests/travis/prepare.sh index 8ba216da70..93bed0daf7 100755 --- a/tests/travis/prepare.sh +++ b/tests/travis/prepare.sh @@ -30,8 +30,8 @@ fi mkdir ./tmp/assets mkdir ./tmp/cache mkdir ./tmp/latest +mkdir ./tmp/logs mkdir ./tmp/sessions mkdir ./tmp/templates_c mkdir ./tmp/tcpdf -mkdir ./tmp/logs chmod a+rw ./tests/lib/geoip-files |