diff options
author | robocoder <anthon.pang@gmail.com> | 2010-09-13 01:49:51 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2010-09-13 01:49:51 +0400 |
commit | c820ef3fcdd602d28d7418369cdb4ebeb3125b31 (patch) | |
tree | bfe953a01e5d1a21e05d966dd4a0d6178a0e11dc /tests | |
parent | 833f6dc32f1e6ed6da7b9b3fb8cc2f23ce5f3ffb (diff) |
refs #1507, refs #1527 - revert hack from #1507, and fix unit test on Windows per Julien's email
git-svn-id: http://dev.piwik.org/svn/trunk@3140 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/Piwik/serveStaticFile.test.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/core/Piwik/serveStaticFile.test.php b/tests/core/Piwik/serveStaticFile.test.php index b9c712767a..ba86e503c5 100644 --- a/tests/core/Piwik/serveStaticFile.test.php +++ b/tests/core/Piwik/serveStaticFile.test.php @@ -20,7 +20,6 @@ if(!defined("PIWIK_PATH_TEST_TO_ROOT")) { // This is Piwik logo, the static file used in this test suit define("TEST_FILE_LOCATION", PIWIK_PATH_TEST_TO_ROOT . "/tests/core/Piwik/lipsum.txt"); define("TEST_FILE_CONTENT_TYPE", "text/plain"); -define("TEST_FILE_MODE", 0644); // Defines http request parameters define("FILE_MODE_REQUEST_VAR", "fileMode"); @@ -147,7 +146,14 @@ class Test_Piwik_serveStaticFile extends UnitTestCase curl_close($curlHandle); // Restoring file mode - chmod(TEST_FILE_LOCATION, TEST_FILE_MODE); + if(Piwik_Common::isWindows()) + { + chmod(TEST_FILE_LOCATION, 0777); + } + else + { + chmod(TEST_FILE_LOCATION, 0644); + } $this->assertEqual($responseInfo["http_code"], 505); } |