قرینه از
https://github.com/matomo-org/matomo.git
synced 2025-08-22 06:57:53 +00:00

* 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
20 خطوط
701 B
PHP
20 خطوط
701 B
PHP
<?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'; |