diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-10-13 06:21:24 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-10-13 06:21:24 +0400 |
commit | 9f4ba4eea6c85a92b87fbad6f0556ee5d8551762 (patch) | |
tree | 0225fe694c5d6b15ca9ba9d528e16f03ce4249bd /tests/PHPUnit/bootstrap.php | |
parent | c87dc623acf264d7559991cfc66cefa85bba4f1f (diff) |
refs #5940 moved files into a subfolder framework, added autoloader to remove duplicated code to load autoload.php and to be able to register more autoloaders (eg for test files) on demand. This I got read of many includes that had to be updated all the time and that had to be updated all the time when moving iles
Diffstat (limited to 'tests/PHPUnit/bootstrap.php')
-rw-r--r-- | tests/PHPUnit/bootstrap.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php index 8335346c6b..4ab7f06466 100644 --- a/tests/PHPUnit/bootstrap.php +++ b/tests/PHPUnit/bootstrap.php @@ -27,26 +27,21 @@ if (!defined('PIWIK_INCLUDE_SEARCH_PATH')) { error_reporting(E_ALL | E_NOTICE); @date_default_timezone_set('UTC'); -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/Loader.php'; + +\Piwik\Loader::init(); +\Piwik\Loader::registerTestNamespace(); require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php'; require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php'; require_once PIWIK_INCLUDE_PATH . '/core/FrontController.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/Fixture.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixture.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/SystemTestCase.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/IntegrationTestCase.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/DatabaseTestCase.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/ConsoleCommandTestCase.php'; +require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/BenchmarkTestCase.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/FakeAccess.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/MockPiwikOption.php'; require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/TestRequestCollection.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/TestRequestResponse.php'; -require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Impl/ApiTestConfig.php'; if (getenv('PIWIK_USE_XHPROF') == 1) { \Piwik\Profiler::setupProfilerXHProf(); @@ -84,7 +79,7 @@ Try again. -> If you still get this message, you can work around it by specifying Host + Request_Uri at the top of this file tests/PHPUnit/bootstrap.php. <-"; exit(1); } - $baseUrl = \Piwik\Tests\Impl\Fixture::getRootUrl(); + $baseUrl = \Piwik\Tests\Framework\Fixture::getRootUrl(); \Piwik\SettingsPiwik::checkPiwikServerWorking($baseUrl, $acceptInvalidSSLCertificates = true); } |