diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/request/all_tests.php | 6 | ||||
-rw-r--r-- | tests/request/deactivated_super_global.php | 4 | ||||
-rw-r--r-- | tests/request/request.php | 12 | ||||
-rw-r--r-- | tests/request/request_var.php | 6 |
4 files changed, 12 insertions, 16 deletions
diff --git a/tests/request/all_tests.php b/tests/request/all_tests.php index 6757d463c5..f1633309fd 100644 --- a/tests/request/all_tests.php +++ b/tests/request/all_tests.php @@ -15,6 +15,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) require_once 'test_framework/framework.php'; require_once 'PHPUnit/TextUI/TestRunner.php'; +require_once 'request/type_cast_helper.php'; require_once 'request/deactivated_super_global.php'; require_once 'request/request.php'; require_once 'request/request_var.php'; @@ -30,9 +31,10 @@ class phpbb_request_all_tests { $suite = new PHPUnit_Framework_TestSuite('phpBB Request Parameter Handling'); - $suite->addTestSuite('phpbb_request_deactivated_super_global_test'); + $suite->addTestSuite('phpbb_type_cast_helper_test'); + $suite->addTestSuite('phpbb_deactivated_super_global_test'); $suite->addTestSuite('phpbb_request_test'); - $suite->addTestSuite('phpbb_request_request_var_test'); + $suite->addTestSuite('phpbb_request_var_test'); return $suite; } diff --git a/tests/request/deactivated_super_global.php b/tests/request/deactivated_super_global.php index dcf17b0a0e..2991badd1a 100644 --- a/tests/request/deactivated_super_global.php +++ b/tests/request/deactivated_super_global.php @@ -11,12 +11,12 @@ require_once 'test_framework/framework.php'; require_once '../phpBB/includes/request/deactivated_super_global.php'; -class phpbb_request_deactivated_super_global_test extends phpbb_test_case +class phpbb_deactivated_super_global_test extends phpbb_test_case { /** * Checks that on write access the correct error is thrown */ - public function test_write_results_in_error() + public function test_write_triggers_error() { $this->setExpectedTriggerError(E_USER_ERROR); $obj = new phpbb_deactivated_super_global($this->getMock('phpbb_request_interface'), 'obj', phpbb_request_interface::POST); diff --git a/tests/request/request.php b/tests/request/request.php index 1376d0665a..df71d783ed 100644 --- a/tests/request/request.php +++ b/tests/request/request.php @@ -9,6 +9,8 @@ */ require_once 'test_framework/framework.php'; +require_once '../phpBB/includes/request/type_cast_helper_interface.php'; +require_once '../phpBB/includes/request/type_cast_helper.php'; require_once '../phpBB/includes/request/request_interface.php'; require_once '../phpBB/includes/request/deactivated_super_global.php'; require_once '../phpBB/includes/request/request.php'; @@ -62,16 +64,6 @@ class phpbb_request_test extends phpbb_test_case $this->assertFalse($this->request->is_set_post('unset')); } - public function test_addslashes_recursively() - { - $data = array('some"string' => array('that"' => 'really"', 'needs"' => '"escaping')); - $expected = array('some\\"string' => array('that\\"' => 'really\\"', 'needs\\"' => '\\"escaping')); - - phpbb_request::addslashes_recursively($data); - - $this->assertEquals($expected, $data); - } - public function test_variable_names() { $expected = array('test', 'unset'); diff --git a/tests/request/request_var.php b/tests/request/request_var.php index ca764a6481..5bdcb5d4e7 100644 --- a/tests/request/request_var.php +++ b/tests/request/request_var.php @@ -8,12 +8,14 @@ */ require_once 'test_framework/framework.php'; -require_once '../phpBB/includes/request/request_interface.php'; +require_once '../phpBB/includes/request/type_cast_helper_interface.php'; +require_once '../phpBB/includes/request/type_cast_helper.php'; require_once '../phpBB/includes/request/deactivated_super_global.php'; +require_once '../phpBB/includes/request/request_interface.php'; require_once '../phpBB/includes/request/request.php'; require_once '../phpBB/includes/functions.php'; -class phpbb_request_request_var_test extends phpbb_test_case +class phpbb_request_var_test extends phpbb_test_case { /** * @dataProvider request_variables |