diff options
author | Fyorl <gaelreth@gmail.com> | 2012-07-16 17:33:05 +0100 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-07-16 17:52:03 +0100 |
commit | 797ee16eaf2e8dc562185cd940351bcfd311cf53 (patch) | |
tree | 2b1802004926689b92f6372300bb3efd26d44951 /tests | |
parent | 8f5182bf84399c52a23498a597ac907b6fba9ef5 (diff) | |
download | forums-797ee16eaf2e8dc562185cd940351bcfd311cf53.tar forums-797ee16eaf2e8dc562185cd940351bcfd311cf53.tar.gz forums-797ee16eaf2e8dc562185cd940351bcfd311cf53.tar.bz2 forums-797ee16eaf2e8dc562185cd940351bcfd311cf53.tar.xz forums-797ee16eaf2e8dc562185cd940351bcfd311cf53.zip |
[ticket/10981] Added goutte via composer
composer.phar added and autoloaded before tests
PHPBB3-10981
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bootstrap.php | 15 | ||||
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 2 |
2 files changed, 15 insertions, 2 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'; } diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 76fed76fae..2b6a6aaf29 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -36,8 +36,6 @@ class phpbb_functional_test_case extends phpbb_test_case { self::markTestSkipped('phar extension is not loaded'); } - - require_once 'phar://' . __DIR__ . '/../../vendor/goutte.phar'; } public function setUp() |