diff options
-rw-r--r-- | tests/bootstrap.php | 4 | ||||
-rw-r--r-- | tests/class_loader/class_loader_test.php | 12 | ||||
-rw-r--r-- | tests/request/deactivated_super_global.php | 3 | ||||
-rw-r--r-- | tests/request/request.php | 5 | ||||
-rw-r--r-- | tests/request/request_var.php | 5 | ||||
-rw-r--r-- | tests/request/type_cast_helper.php | 2 | ||||
-rw-r--r-- | tests/security/redirect.php | 1 |
7 files changed, 16 insertions, 16 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 99f145e427..161bd83a3d 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -26,6 +26,10 @@ else } require_once $phpbb_root_path . 'includes/constants.php'; +require_once $phpbb_root_path . 'includes/class_loader.' . $phpEx; + +$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx); +$class_loader->register(); require_once 'test_framework/phpbb_test_case_helpers.php'; require_once 'test_framework/phpbb_test_case.php'; diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php index aef4f1de07..3eb3c915a1 100644 --- a/tests/class_loader/class_loader_test.php +++ b/tests/class_loader/class_loader_test.php @@ -14,6 +14,18 @@ require_once __DIR__ . '/../../phpBB/includes/class_loader.php'; class phpbb_class_loader_test extends PHPUnit_Framework_TestCase { + public function setUp() + { + global $class_loader; + $class_loader->unregister(); + } + + public function tearDown() + { + global $class_loader; + $class_loader->register(); + } + public function test_resolve_path() { $prefix = __DIR__ . '/'; diff --git a/tests/request/deactivated_super_global.php b/tests/request/deactivated_super_global.php index ea385831c9..995f93443d 100644 --- a/tests/request/deactivated_super_global.php +++ b/tests/request/deactivated_super_global.php @@ -8,9 +8,6 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/request/interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/deactivated_super_global.php'; - class phpbb_deactivated_super_global_test extends phpbb_test_case { /** diff --git a/tests/request/request.php b/tests/request/request.php index 7cec70b0d4..203c9fd880 100644 --- a/tests/request/request.php +++ b/tests/request/request.php @@ -8,11 +8,6 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/request/type_cast_helper_interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/deactivated_super_global.php'; -require_once __DIR__ . '/../../phpBB/includes/request/request.php'; - class phpbb_request_test extends phpbb_test_case { private $type_cast_helper; diff --git a/tests/request/request_var.php b/tests/request/request_var.php index e452aefea9..8848e388bf 100644 --- a/tests/request/request_var.php +++ b/tests/request/request_var.php @@ -7,11 +7,6 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/request/type_cast_helper_interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/type_cast_helper.php'; -require_once __DIR__ . '/../../phpBB/includes/request/deactivated_super_global.php'; -require_once __DIR__ . '/../../phpBB/includes/request/interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/request.php'; require_once __DIR__ . '/../../phpBB/includes/functions.php'; require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; diff --git a/tests/request/type_cast_helper.php b/tests/request/type_cast_helper.php index 3f27269acb..6d4e7055d5 100644 --- a/tests/request/type_cast_helper.php +++ b/tests/request/type_cast_helper.php @@ -9,8 +9,6 @@ */ require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; -require_once __DIR__ . '/../../phpBB/includes/request/type_cast_helper_interface.php'; -require_once __DIR__ . '/../../phpBB/includes/request/type_cast_helper.php'; class phpbb_type_cast_helper_test extends phpbb_test_case { diff --git a/tests/security/redirect.php b/tests/security/redirect.php index c53414e7df..1557384507 100644 --- a/tests/security/redirect.php +++ b/tests/security/redirect.php @@ -8,7 +8,6 @@ */ require_once __DIR__ . '/base.php'; - require_once __DIR__ . '/../../phpBB/includes/functions.php'; require_once __DIR__ . '/../../phpBB/includes/session.php'; |