diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2011-02-01 14:09:52 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-02-01 14:09:52 +0100 |
commit | 6b00d7aa096b01ce6e59a8467f79eb193c25a35b (patch) | |
tree | cc3b4cdd973bc9aaf094145d318462704cd1fe6a /tests/functions_acp | |
parent | 2b70f3d0e2c85f4ff639aec1077afff3154506dc (diff) | |
download | forums-6b00d7aa096b01ce6e59a8467f79eb193c25a35b.tar forums-6b00d7aa096b01ce6e59a8467f79eb193c25a35b.tar.gz forums-6b00d7aa096b01ce6e59a8467f79eb193c25a35b.tar.bz2 forums-6b00d7aa096b01ce6e59a8467f79eb193c25a35b.tar.xz forums-6b00d7aa096b01ce6e59a8467f79eb193c25a35b.zip |
[ticket/9823] Update Unit tests to the new system and correct some minor issues
PHPBB3-9823
Diffstat (limited to 'tests/functions_acp')
-rw-r--r-- | tests/functions_acp/all_tests.php | 48 | ||||
-rw-r--r-- | tests/functions_acp/build_cfg_template_test.php (renamed from tests/functions_acp/build_cfg_template.php) | 15 | ||||
-rw-r--r-- | tests/functions_acp/build_select_test.php (renamed from tests/functions_acp/build_select.php) | 7 | ||||
-rw-r--r-- | tests/functions_acp/h_radio_test.php (renamed from tests/functions_acp/h_radio.php) | 7 | ||||
-rw-r--r-- | tests/functions_acp/validate_config_vars_test.php (renamed from tests/functions_acp/validate_config_vars.php) | 5 | ||||
-rw-r--r-- | tests/functions_acp/validate_range_test.php (renamed from tests/functions_acp/validate_range.php) | 5 |
6 files changed, 17 insertions, 70 deletions
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 @@ -<?php -/** -* -* @package testing -* @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License -* -*/ - -if (!defined('PHPUnit_MAIN_METHOD')) -{ - define('PHPUnit_MAIN_METHOD', 'phpbb_functions_all_tests::main'); -} - -require_once 'test_framework/framework.php'; -require_once 'PHPUnit/TextUI/TestRunner.php'; - -require_once 'functions_acp/build_cfg_template.php'; -require_once 'functions_acp/build_select.php'; -require_once 'functions_acp/h_radio.php'; -require_once 'functions_acp/validate_config_vars.php'; -require_once 'functions_acp/validate_range.php'; - -class phpbb_functions_acp_all_tests -{ - public static function main() - { - PHPUnit_TextUI_TestRunner::run(self::suite()); - } - - public static function suite() - { - $suite = new PHPUnit_Framework_TestSuite('phpBB Network Functions'); - - $suite->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 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 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 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 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 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 { |