-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When dispatch is disabled via a constant, it should not be dispatched (…
…#14034) * When dispatch is disabled via a constant, it should not be dispatched Eg when Matomo is not installed, it would still dispatch the request in https://github.com/matomo-org/matomo/blob/3.8.1-b1/plugins/Installation/Installation.php#L111 even when `PIWIK_ENABLE_DISPATCH` is disabled. Will set it to WIP for now as I'm not sure if we want to have this actually merged or not. * Update Installation.php * Use correct exception class * throw exception if one is given * adding a test * fix tests * trying to fix test
- Loading branch information
Showing
4 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* Proxy to index.php, but will use the Test DB | ||
* 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; | ||
|
||
define('PIWIK_ENABLE_DISPATCH', false); | ||
|
||
require realpath(dirname(__FILE__)) . "/includes.php"; | ||
$testEnvironment = new TestingEnvironmentVariables(); | ||
$testEnvironment->configFileLocal = PIWIK_INCLUDE_PATH . "tmp/test.config.ini.php"; | ||
$testEnvironment->save(); | ||
|
||
Environment::setGlobalEnvironmentManipulator(new TestingEnvironmentManipulator($testEnvironment)); | ||
|
||
include PIWIK_INCLUDE_PATH . '/index.php'; |