aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bootstrap.php')
-rw-r--r--tests/bootstrap.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index d6c5d25bc8..d687db622a 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -22,5 +22,20 @@ require_once 'test_framework/phpbb_database_test_connection_manager.php';
if (version_compare(PHP_VERSION, '5.3.0-dev', '>='))
{
+ if (getenv('PHPBB_NO_COMPOSER_AUTOLOAD'))
+ {
+ if (getenv('PHPBB_AUTOLOAD'))
+ {
+ require(getenv('PHPBB_AUTOLOAD'));
+ }
+ }
+ else
+ {
+ if (!file_exists($phpbb_root_path . 'vendor/autoload.php'))
+ {
+ trigger_error('You have not set up composer dependencies. See http://getcomposer.org/.', E_USER_ERROR);
+ }
+ require($phpbb_root_path . 'vendor/autoload.php');
+ }
require_once 'test_framework/phpbb_functional_test_case.php';
}