Welcome to mirror list, hosted at ThFree Co, Russian Federation.

includes.php « proxy « PHPUnit « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 858ae485d20ae74fdca4e65dca9ad2581804fa85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

// Good old test proxy endpoints have some commons

if (!defined('PIWIK_INCLUDE_PATH')) {
    define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__)) . '/../../../');
}
if (!defined('PIWIK_USER_PATH')) {
    define('PIWIK_USER_PATH', PIWIK_INCLUDE_PATH);
}

require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')
    ? PIWIK_INCLUDE_PATH . '/vendor/autoload.php' // Piwik is the main project
    : PIWIK_INCLUDE_PATH . '/../../autoload.php'; // Piwik is installed as a dependency

require_once PIWIK_INCLUDE_PATH . '/core/EventDispatcher.php';
require_once PIWIK_INCLUDE_PATH . '/core/Piwik.php';
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
if (file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')) {
    $vendorDirectory = PIWIK_INCLUDE_PATH . '/vendor';
} else {
    $vendorDirectory = PIWIK_INCLUDE_PATH . '/../..';
}
require_once $vendorDirectory . '/autoload.php';
require_once $vendorDirectory . '/mustangostang/spyc/Spyc.php';
require_once $vendorDirectory . '/piwik/device-detector/DeviceDetector.php';

\Piwik\SettingsServer::setMaxExecutionTime(0);

// Make sure Data processed in cron core:archive command is not being purged instantly (useful for: Integration/ArchiveCronTest)
if(\Piwik\SettingsServer::isArchivePhpTriggered()) {
    \Piwik\ArchiveProcessor\Rules::disablePurgeOutdatedArchives();
}