diff options
-rw-r--r-- | plugins/Actions/tests/Actions.test.php | 2 | ||||
-rw-r--r-- | plugins/Proxy/tests/Proxy.test.php | 1 | ||||
-rw-r--r-- | tests/core/DataTable/Renderer.test.php | 1 | ||||
-rw-r--r-- | tests/core/Http.test.php | 1 | ||||
-rw-r--r-- | tests/core/Nonce.test.php | 1 | ||||
-rw-r--r-- | tests/core/PHP_Related.test.php | 1 | ||||
-rw-r--r-- | tests/core/Piwik.test.php | 1 | ||||
-rw-r--r-- | tests/core/Segment.test.php | 2 | ||||
-rw-r--r-- | tests/core/Url.test.php | 3 |
9 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Actions/tests/Actions.test.php b/plugins/Actions/tests/Actions.test.php index 4723c9c91d..dce50a9688 100644 --- a/plugins/Actions/tests/Actions.test.php +++ b/plugins/Actions/tests/Actions.test.php @@ -15,11 +15,13 @@ class Test_Piwik_Actions extends UnitTestCase { $userFile = PIWIK_INCLUDE_PATH . '/tests/resources/plugins/Actions/Actions.config.ini.php'; Piwik::createConfigObject($userFile); + Zend_Registry::get('config')->setTestEnvironment(); } function tearDown() { Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); } function test_getActionExplodedNames() diff --git a/plugins/Proxy/tests/Proxy.test.php b/plugins/Proxy/tests/Proxy.test.php index fab3b5f6a0..b775f5f7aa 100644 --- a/plugins/Proxy/tests/Proxy.test.php +++ b/plugins/Proxy/tests/Proxy.test.php @@ -9,6 +9,7 @@ class Test_Piwik_Proxy extends UnitTestCase public function test_isAcceptableRemoteUrl() { Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); $data = array( // piwik white list (and used in homepage) diff --git a/tests/core/DataTable/Renderer.test.php b/tests/core/DataTable/Renderer.test.php index b824122d50..7431e739c1 100644 --- a/tests/core/DataTable/Renderer.test.php +++ b/tests/core/DataTable/Renderer.test.php @@ -18,6 +18,7 @@ class Test_Piwik_DataTable_Renderer extends UnitTestCase { parent::setUp(); Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); Piwik_DataTable_Manager::getInstance()->deleteAll(); } diff --git a/tests/core/Http.test.php b/tests/core/Http.test.php index ac892853c8..0f2d4a3111 100644 --- a/tests/core/Http.test.php +++ b/tests/core/Http.test.php @@ -9,6 +9,7 @@ class Test_Piwik_Http extends UnitTestCase public function test_fetchRemoteFile() { Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); $methods = array( 'curl', diff --git a/tests/core/Nonce.test.php b/tests/core/Nonce.test.php index 15b7b3889c..67391598e5 100644 --- a/tests/core/Nonce.test.php +++ b/tests/core/Nonce.test.php @@ -23,6 +23,7 @@ class Test_Piwik_Nonce extends UnitTestCase public function test_getAcceptableOrigins() { Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); $tests = array( // HTTP_HOST => expected diff --git a/tests/core/PHP_Related.test.php b/tests/core/PHP_Related.test.php index 59c23ac7d5..cfd060f67a 100644 --- a/tests/core/PHP_Related.test.php +++ b/tests/core/PHP_Related.test.php @@ -32,6 +32,7 @@ class Test_PHP_Related extends UnitTestCase { ini_set('memory_limit','200M'); Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); Piwik::createLogObject(); //test array[0] array[1] array[2] //VS diff --git a/tests/core/Piwik.test.php b/tests/core/Piwik.test.php index 3f9e8254ea..95d5a2b355 100644 --- a/tests/core/Piwik.test.php +++ b/tests/core/Piwik.test.php @@ -69,6 +69,7 @@ class Test_Piwik extends UnitTestCase public function test_checkValidLoginString() { Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); $fail = array( '', diff --git a/tests/core/Segment.test.php b/tests/core/Segment.test.php index f9704b758a..c7902b256b 100644 --- a/tests/core/Segment.test.php +++ b/tests/core/Segment.test.php @@ -10,6 +10,8 @@ class Test_Piwik_Segment extends UnitTestCase { parent::setUp(); Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); + // Load and install plugins $pluginsManager = Piwik_PluginsManager::getInstance(); $pluginsManager->loadPlugins( Zend_Registry::get('config')->Plugins->Plugins->toArray() ); diff --git a/tests/core/Url.test.php b/tests/core/Url.test.php index 0e144fe77a..dba2a7c125 100644 --- a/tests/core/Url.test.php +++ b/tests/core/Url.test.php @@ -13,7 +13,8 @@ class Test_Piwik_Url extends UnitTestCase */ public function test_allMethods() { - Piwik::createConfigObject(); + Piwik::createConfigObject(); + Zend_Registry::get('config')->setTestEnvironment(); $this->assertEqual(Piwik_Url::getCurrentQueryStringWithParametersModified(array()),Piwik_Url::getCurrentQueryString() ); $this->assertEqual(Piwik_Url::getCurrentUrl(), Piwik_Url::getCurrentUrlWithoutQueryString()); |