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:
authorThomas Steur <tsteur@users.noreply.github.com>2019-09-17 23:35:22 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-09-17 23:35:22 +0300
commit42b4ab13bc36511fabbf376e098e07ffae0d674a (patch)
tree1deef1ec16dca25b3a41cd200d5a481f7803e157 /tests/PHPUnit/Integration
parent583d8d1c28cf0b96810a81dfb7c76a3c1140d764 (diff)
Fix user path was not working as it should (allow placing config file outside webroot) (#14866)
* Fix user path was not working as it should * fix error
Diffstat (limited to 'tests/PHPUnit/Integration')
-rw-r--r--tests/PHPUnit/Integration/AssetManager/UIAssetMinifierTest.php2
-rw-r--r--tests/PHPUnit/Integration/AssetManagerTest.php4
-rw-r--r--tests/PHPUnit/Integration/HttpTest.php4
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/PHPUnit/Integration/AssetManager/UIAssetMinifierTest.php b/tests/PHPUnit/Integration/AssetManager/UIAssetMinifierTest.php
index 9fde0b351b..c45c92876a 100644
--- a/tests/PHPUnit/Integration/AssetManager/UIAssetMinifierTest.php
+++ b/tests/PHPUnit/Integration/AssetManager/UIAssetMinifierTest.php
@@ -45,7 +45,7 @@ class UIAssetMinifierTest extends \PHPUnit_Framework_TestCase
*/
public function test_isMinifiedJs($scriptFileName, $isMinified)
{
- $scriptFile = new OnDiskUIAsset(PIWIK_USER_PATH, $scriptFileName);
+ $scriptFile = new OnDiskUIAsset(PIWIK_DOCUMENT_ROOT, $scriptFileName);
$this->assertEquals(
$isMinified,
diff --git a/tests/PHPUnit/Integration/AssetManagerTest.php b/tests/PHPUnit/Integration/AssetManagerTest.php
index d6bfcc067a..82654af55a 100644
--- a/tests/PHPUnit/Integration/AssetManagerTest.php
+++ b/tests/PHPUnit/Integration/AssetManagerTest.php
@@ -336,7 +336,7 @@ class AssetManagerTest extends IntegrationTestCase
*/
private function getExpectedMergedJs($filename)
{
- $expectedMergeResult = new OnDiskUIAsset(PIWIK_USER_PATH, self::ASSET_MANAGER_TEST_DIR .'scripts/' . $filename);
+ $expectedMergeResult = new OnDiskUIAsset(PIWIK_DOCUMENT_ROOT, self::ASSET_MANAGER_TEST_DIR .'scripts/' . $filename);
$expectedContent = $expectedMergeResult->getContent();
@@ -357,7 +357,7 @@ class AssetManagerTest extends IntegrationTestCase
*/
private function getExpectedMergedStylesheet()
{
- $expectedMergeResult = new OnDiskUIAsset(PIWIK_USER_PATH, self::ASSET_MANAGER_TEST_DIR .'stylesheets/ExpectedMergeResult.css');
+ $expectedMergeResult = new OnDiskUIAsset(PIWIK_DOCUMENT_ROOT, self::ASSET_MANAGER_TEST_DIR .'stylesheets/ExpectedMergeResult.css');
$expectedContent = $expectedMergeResult->getContent();
diff --git a/tests/PHPUnit/Integration/HttpTest.php b/tests/PHPUnit/Integration/HttpTest.php
index f179276443..ef2585ad5d 100644
--- a/tests/PHPUnit/Integration/HttpTest.php
+++ b/tests/PHPUnit/Integration/HttpTest.php
@@ -42,7 +42,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
public function testFetchApiLatestVersion()
{
- $destinationPath = PIWIK_USER_PATH . '/tmp/latest/LATEST';
+ $destinationPath = PIWIK_DOCUMENT_ROOT . '/tmp/latest/LATEST';
Http::fetchRemoteFile(Fixture::getRootUrl(), $destinationPath, 3);
$this->assertFileExists($destinationPath);
$this->assertGreaterThan(0, filesize($destinationPath));
@@ -50,7 +50,7 @@ class HttpTest extends \PHPUnit_Framework_TestCase
public function testFetchLatestZip()
{
- $destinationPath = PIWIK_USER_PATH . '/tmp/latest/latest.zip';
+ $destinationPath = PIWIK_DOCUMENT_ROOT . '/tmp/latest/latest.zip';
Http::fetchRemoteFile(Fixture::getRootUrl() . 'tests/PHPUnit/Integration/Http/fixture.zip', $destinationPath, 3, 30);
$this->assertFileExists($destinationPath);
$this->assertGreaterThan(0, filesize($destinationPath));