diff --git a/tests/functions_acp/all_tests.php b/tests/functions_acp/all_tests.php deleted file mode 100644 index 64956593fd..0000000000 --- a/tests/functions_acp/all_tests.php +++ /dev/null @@ -1,48 +0,0 @@ -addTestSuite('phpbb_functions_acp_build_cfg_template_test'); - $suite->addTestSuite('phpbb_functions_acp_built_select_test'); - $suite->addTestSuite('phpbb_functions_acp_h_radio_test'); - $suite->addTestSuite('phpbb_functions_acp_validate_config_vars_test'); - $suite->addTestSuite('phpbb_functions_acp_validate_range_test'); - - return $suite; - } -} - -if (PHPUnit_MAIN_METHOD == 'phpbb_functions_acp_all_tests::main') -{ - phpbb_functions_acp_all_tests::main(); -} diff --git a/tests/functions_acp/build_cfg_template.php b/tests/functions_acp/build_cfg_template_test.php similarity index 94% rename from tests/functions_acp/build_cfg_template.php rename to tests/functions_acp/build_cfg_template_test.php index 07f82e933a..c573c7cdb0 100644 --- a/tests/functions_acp/build_cfg_template.php +++ b/tests/functions_acp/build_cfg_template_test.php @@ -7,9 +7,8 @@ * */ -require_once 'test_framework/framework.php'; -require_once 'functions_acp/user_mock.php'; -require_once '../phpBB/includes/functions_acp.php'; +require_once dirname(__FILE__) . 'user_mock.php'; +require_once dirname(__FILE__) . '../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { @@ -50,7 +49,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars)); } @@ -84,7 +83,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars)); } @@ -110,7 +109,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars)); } @@ -160,7 +159,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars)); } @@ -186,7 +185,7 @@ class phpbb_functions_acp_build_cfg_template_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_cfg_template($tpl_type, $key, $new, $config_key, $vars)); } diff --git a/tests/functions_acp/build_select.php b/tests/functions_acp/build_select_test.php similarity index 86% rename from tests/functions_acp/build_select.php rename to tests/functions_acp/build_select_test.php index 5a097fefab..a4f5e419ea 100644 --- a/tests/functions_acp/build_select.php +++ b/tests/functions_acp/build_select_test.php @@ -7,9 +7,8 @@ * */ -require_once 'test_framework/framework.php'; -require_once 'functions_acp/user_mock.php'; -require_once '../phpBB/includes/functions_acp.php'; +require_once dirname(__FILE__) . 'user_mock.php'; +require_once dirname(__FILE__) . '../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_built_select_test extends phpbb_test_case { @@ -50,7 +49,7 @@ class phpbb_functions_acp_built_select_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, build_select($option_ary, $option_default)); } diff --git a/tests/functions_acp/h_radio.php b/tests/functions_acp/h_radio_test.php similarity index 94% rename from tests/functions_acp/h_radio.php rename to tests/functions_acp/h_radio_test.php index 6550c8f818..924b502ede 100644 --- a/tests/functions_acp/h_radio.php +++ b/tests/functions_acp/h_radio_test.php @@ -7,9 +7,8 @@ * */ -require_once 'test_framework/framework.php'; -require_once 'functions_acp/user_mock.php'; -require_once '../phpBB/includes/functions_acp.php'; +require_once dirname(__FILE__) . 'user_mock.php'; +require_once dirname(__FILE__) . '../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_h_radio_test extends phpbb_test_case { @@ -115,7 +114,7 @@ class phpbb_functions_acp_h_radio_test extends phpbb_test_case { global $user; - $user->lang =new phpbb_mock_lang(); + $user->lang = new phpbb_mock_lang(); $this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key)); } diff --git a/tests/functions_acp/validate_config_vars.php b/tests/functions_acp/validate_config_vars_test.php similarity index 96% rename from tests/functions_acp/validate_config_vars.php rename to tests/functions_acp/validate_config_vars_test.php index 04a5fead7a..722d0ebddb 100644 --- a/tests/functions_acp/validate_config_vars.php +++ b/tests/functions_acp/validate_config_vars_test.php @@ -7,9 +7,8 @@ * */ -require_once 'test_framework/framework.php'; -require_once 'functions_acp/user_mock.php'; -require_once '../phpBB/includes/functions_acp.php'; +require_once dirname(__FILE__) . 'user_mock.php'; +require_once dirname(__FILE__) . '../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case { diff --git a/tests/functions_acp/validate_range.php b/tests/functions_acp/validate_range_test.php similarity index 97% rename from tests/functions_acp/validate_range.php rename to tests/functions_acp/validate_range_test.php index cac54dd5ed..fb1d15c032 100644 --- a/tests/functions_acp/validate_range.php +++ b/tests/functions_acp/validate_range_test.php @@ -7,9 +7,8 @@ * */ -require_once 'test_framework/framework.php'; -require_once 'functions_acp/user_mock.php'; -require_once '../phpBB/includes/functions_acp.php'; +require_once dirname(__FILE__) . 'user_mock.php'; +require_once dirname(__FILE__) . '../../phpBB/includes/functions_acp.php'; class phpbb_functions_acp_validate_range_test extends phpbb_test_case {