diff options
author | diosmosis <benaka@piwik.pro> | 2015-04-09 08:52:47 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-04-09 08:52:47 +0300 |
commit | 3a8b069844bc29a0d0f75f3df007a75a5e2b967a (patch) | |
tree | d44824e3d07cc83b84801110dba20783b333f2d7 /tests/PHPUnit/System/EnvironmentValidationTest.php | |
parent | 3acd811463c9a8c40775f3d948fe76908554e0e1 (diff) |
Add archive_web as entry point to test in EnvironmentValidationTest and verify that piwik host is correctly set and used in CronArchive (via console or web) w/o needing explicit Config setup in CronArchive class.
Diffstat (limited to 'tests/PHPUnit/System/EnvironmentValidationTest.php')
-rw-r--r-- | tests/PHPUnit/System/EnvironmentValidationTest.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/PHPUnit/System/EnvironmentValidationTest.php b/tests/PHPUnit/System/EnvironmentValidationTest.php index f48f8078bf..d8e76fd95f 100644 --- a/tests/PHPUnit/System/EnvironmentValidationTest.php +++ b/tests/PHPUnit/System/EnvironmentValidationTest.php @@ -21,7 +21,8 @@ class EnvironmentValidationTest extends SystemTestCase return array( array('tracker'), array('web'), - array('console') + array('console'), + array('archive_web') ); } @@ -80,14 +81,17 @@ class EnvironmentValidationTest extends SystemTestCase array('global.ini.php', 'tracker'), array('global.ini.php', 'web'), array('global.ini.php', 'console'), + array('global.ini.php', 'archive_web'), array('config.ini.php', 'tracker'), array('config.ini.php', 'web'), array('config.ini.php', 'console'), + array('config.ini.php', 'archive_web'), array('common.config.ini.php', 'tracker'), array('common.config.ini.php', 'web'), array('common.config.ini.php', 'console'), + array('common.config.ini.php', 'archive_web'), ); } @@ -178,6 +182,8 @@ class EnvironmentValidationTest extends SystemTestCase return $this->sendRequestToWeb(); } else if ($entryPoint == 'console') { return $this->startConsoleProcess(); + } else if ($entryPoint == 'archive_web') { + return $this->sendArchiveWebRequest(); } else { throw new \Exception("Don't know how to access '$entryPoint'."); } @@ -193,6 +199,11 @@ class EnvironmentValidationTest extends SystemTestCase return $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php'); } + private function sendArchiveWebRequest() + { + return $this->curl(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/archive.php?token_auth=' . Fixture::getTokenAuth()); + } + private function startConsoleProcess() { $pathToProxyConsole = PIWIK_INCLUDE_PATH . '/tests/PHPUnit/proxy/console'; |