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:
authordiosmosis <benaka@piwik.pro>2015-06-01 09:07:16 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-05 23:36:58 +0300
commit52bed8ed6fd9240f476a7bf8c739b4d7eabfc9ff (patch)
treed6e15510346664e4aa92c82ea7aacce4caea608b /tests/PHPUnit/proxy
parent33cfb1d02cae5b1454d223f15acef9db1f65f77c (diff)
Create manipulator manually in proxy entrypoints instead of using TestingEnvironmentVariables::addHooks().
Diffstat (limited to 'tests/PHPUnit/proxy')
-rw-r--r--tests/PHPUnit/proxy/archive.php6
-rw-r--r--tests/PHPUnit/proxy/console6
-rw-r--r--tests/PHPUnit/proxy/index.php6
-rwxr-xr-xtests/PHPUnit/proxy/piwik.php5
4 files changed, 19 insertions, 4 deletions
diff --git a/tests/PHPUnit/proxy/archive.php b/tests/PHPUnit/proxy/archive.php
index 2a6bb927d3..ba4faeca84 100644
--- a/tests/PHPUnit/proxy/archive.php
+++ b/tests/PHPUnit/proxy/archive.php
@@ -1,9 +1,13 @@
<?php
+use Piwik\Application\Environment;
+use Piwik\Tests\Framework\TestingEnvironmentManipulator;
+use Piwik\Tests\Framework\TestingEnvironmentVariables;
+
define('PIWIK_ARCHIVE_NO_TRUNCATE', true);
require realpath(dirname(__FILE__)) . "/includes.php";
-\Piwik\Tests\Framework\TestingEnvironmentVariables::addHooks();
+Environment::addEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables()));
// include archive.php, and let 'er rip
require_once PIWIK_INCLUDE_PATH . "/misc/cron/archive.php";
diff --git a/tests/PHPUnit/proxy/console b/tests/PHPUnit/proxy/console
index c28399b61e..f58f09d1fd 100644
--- a/tests/PHPUnit/proxy/console
+++ b/tests/PHPUnit/proxy/console
@@ -1,7 +1,11 @@
#!/usr/bin/env php
<?php
+use Piwik\Application\Environment;
+use Piwik\Tests\Framework\TestingEnvironmentManipulator;
+use Piwik\Tests\Framework\TestingEnvironmentVariables;
+
require realpath(dirname(__FILE__)) . "/includes.php";
-\Piwik\Tests\Framework\TestingEnvironmentVariables::addHooks();
+Environment::addEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables()));
require_once PIWIK_INCLUDE_PATH . "/console";
diff --git a/tests/PHPUnit/proxy/index.php b/tests/PHPUnit/proxy/index.php
index 391757e7a7..4eb3497882 100644
--- a/tests/PHPUnit/proxy/index.php
+++ b/tests/PHPUnit/proxy/index.php
@@ -4,8 +4,12 @@
* Used by tests/PHPUnit/System/ImportLogsTest.php and tests/PHPUnit/System/UITest.php
*/
+use Piwik\Application\Environment;
+use Piwik\Tests\Framework\TestingEnvironmentManipulator;
+use Piwik\Tests\Framework\TestingEnvironmentVariables;
+
require realpath(dirname(__FILE__)) . "/includes.php";
-\Piwik\Tests\Framework\TestingEnvironmentVariables::addHooks();
+Environment::addEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables()));
include PIWIK_INCLUDE_PATH . '/index.php'; \ No newline at end of file
diff --git a/tests/PHPUnit/proxy/piwik.php b/tests/PHPUnit/proxy/piwik.php
index 633ee0f6c8..f1e94930c3 100755
--- a/tests/PHPUnit/proxy/piwik.php
+++ b/tests/PHPUnit/proxy/piwik.php
@@ -7,10 +7,13 @@
*
*/
+use Piwik\Application\Environment;
use Piwik\DataTable\Manager;
use Piwik\Option;
use Piwik\Plugins\UserCountry\LocationProvider\GeoIp;
use Piwik\Site;
+use Piwik\Tests\Framework\TestingEnvironmentManipulator;
+use Piwik\Tests\Framework\TestingEnvironmentVariables;
use Piwik\Tracker;
require realpath(dirname(__FILE__)) . "/includes.php";
@@ -29,7 +32,7 @@ try {
})
);
- \Piwik\Tests\Framework\TestingEnvironmentVariables::addHooks($globalObservers);
+ Environment::addEnvironmentManipulator(new TestingEnvironmentManipulator(new TestingEnvironmentVariables(), $globalObservers));
GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files';