diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-05-28 14:58:40 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-05-28 14:58:40 +0200 |
commit | f1523944a048e22207d6f200c6d152ecb9fdc136 (patch) | |
tree | 3ba72958a07f767ea96a46d296ee64615c105a71 /tests | |
parent | 467c4d62c44a32a1a60bed2e2a2519b10cdebd33 (diff) | |
download | forums-f1523944a048e22207d6f200c6d152ecb9fdc136.tar forums-f1523944a048e22207d6f200c6d152ecb9fdc136.tar.gz forums-f1523944a048e22207d6f200c6d152ecb9fdc136.tar.bz2 forums-f1523944a048e22207d6f200c6d152ecb9fdc136.tar.xz forums-f1523944a048e22207d6f200c6d152ecb9fdc136.zip |
[ticket/develop/11568] Remove unneccessary calls to assert_response_success()
PHPBB3-11568
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/acp_permissions_test.php | 5 | ||||
-rw-r--r-- | tests/functional/auth_test.php | 1 | ||||
-rw-r--r-- | tests/functional/extension_controller_test.php | 6 | ||||
-rw-r--r-- | tests/functional/extension_permission_lang_test.php | 2 | ||||
-rw-r--r-- | tests/functional/fileupload_form_test.php | 1 | ||||
-rw-r--r-- | tests/functional/forgot_password_test.php | 2 | ||||
-rw-r--r-- | tests/functional/memberlist_test.php | 6 | ||||
-rw-r--r-- | tests/functional/metadata_manager_test.php | 4 | ||||
-rw-r--r-- | tests/functional/notification_test.php | 1 |
9 files changed, 2 insertions, 26 deletions
diff --git a/tests/functional/acp_permissions_test.php b/tests/functional/acp_permissions_test.php index 2f27b68555..3d91242df6 100644 --- a/tests/functional/acp_permissions_test.php +++ b/tests/functional/acp_permissions_test.php @@ -26,7 +26,6 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case // Permissions tab // XXX hardcoded id $crawler = $this->request('GET', 'adm/index.php?i=16&sid=' . $this->sid); - $this->assert_response_success(); // these language strings are html $this->assertContains($this->lang('ACP_PERMISSIONS_EXPLAIN'), $this->get_content()); } @@ -35,7 +34,6 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case { // User permissions $crawler = $this->request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid); - $this->assert_response_success(); $this->assertContains($this->lang('ACP_USERS_PERMISSIONS_EXPLAIN'), $this->get_content()); // Select admin @@ -43,7 +41,6 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case $data = array('username[0]' => 'admin'); $form->setValues($data); $crawler = $this->submit($form); - $this->assert_response_success(); $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text()); } @@ -92,7 +89,6 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case { // Get the form $crawler = $this->request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&${object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid); - $this->assert_response_success(); $this->assertContains($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text()); // XXX globals for phpbb_auth, refactor it later @@ -115,7 +111,6 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case $data = array("setting[$object_id][0][$permission]" => '0'); $form->setValues($data); $crawler = $this->submit($form); - $this->assert_response_success(); $this->assertContains($this->lang('AUTH_UPDATED'), $crawler->text()); // check acl again diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php index 8359bbe8ea..06dc26dfeb 100644 --- a/tests/functional/auth_test.php +++ b/tests/functional/auth_test.php @@ -53,7 +53,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case // check that we are logged in $crawler = $this->request('GET', 'adm/index.php?sid=' . $this->sid); - $this->assert_response_success(); $this->assertContains($this->lang('ADMIN_PANEL'), $crawler->filter('h1')->text()); } } diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php index 7f1decd5b5..1755843398 100644 --- a/tests/functional/extension_controller_test.php +++ b/tests/functional/extension_controller_test.php @@ -91,7 +91,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c { $this->phpbb_extension_manager->enable('foo/bar'); $crawler = $this->request('GET', 'app.php?controller=foo/bar'); - $this->assert_response_success(); $this->assertContains("foo/bar controller handle() method", $crawler->filter('body')->text()); $this->phpbb_extension_manager->purge('foo/bar'); } @@ -103,7 +102,6 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c { $this->phpbb_extension_manager->enable('foo/bar'); $crawler = $this->request('GET', 'app.php?controller=foo/template'); - $this->assert_response_success(); $this->assertContains("I am a variable", $crawler->filter('#content')->text()); $this->phpbb_extension_manager->purge('foo/bar'); } @@ -128,7 +126,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c public function test_exception_should_result_in_500_status_code() { $this->phpbb_extension_manager->enable('foo/bar'); - $crawler = $this->request('GET', 'app.php?controller=foo/exception'); + $crawler = $this->request('GET', 'app.php?controller=foo/exception', false); $this->assert_response_success(500); $this->assertContains('Exception thrown from foo/exception route', $crawler->filter('body')->text()); $this->phpbb_extension_manager->purge('foo/bar'); @@ -145,7 +143,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c */ public function test_error_ext_disabled_or_404() { - $crawler = $this->request('GET', 'app.php?controller=does/not/exist'); + $crawler = $this->request('GET', 'app.php?controller=does/not/exist', false); $this->assert_response_success(404); $this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text()); } diff --git a/tests/functional/extension_permission_lang_test.php b/tests/functional/extension_permission_lang_test.php index 4e40b11560..c1ceae382d 100644 --- a/tests/functional/extension_permission_lang_test.php +++ b/tests/functional/extension_permission_lang_test.php @@ -100,14 +100,12 @@ class phpbb_functional_extension_permission_lang_test extends phpbb_functional_t // User permissions $crawler = $this->request('GET', 'adm/index.php?i=acp_permissions&icat=16&mode=setting_user_global&sid=' . $this->sid); - $this->assert_response_success(); // Select admin $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); $data = array('username[0]' => 'admin'); $form->setValues($data); $crawler = $this->submit($form); - $this->assert_response_success(); // language from language/en/acp/permissions_phpbb.php $this->assertContains('Can attach files', $crawler->filter('body')->text()); diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php index ec2296d6f2..2abea86077 100644 --- a/tests/functional/fileupload_form_test.php +++ b/tests/functional/fileupload_form_test.php @@ -66,7 +66,6 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case { $this->markTestIncomplete('Test fails intermittently.'); $crawler = $this->upload_file('valid.jpg', 'image/jpeg'); - $this->assert_response_success(); // ensure there was no error message rendered $this->assertNotContains('<h2>' . $this->lang('INFORMATION') . '</h2>', $this->get_content()); $this->assertContains($this->lang('POSTED_ATTACHMENTS'), $crawler->filter('#postform h3')->eq(1)->text()); diff --git a/tests/functional/forgot_password_test.php b/tests/functional/forgot_password_test.php index 7c5f27c07e..65d07672cf 100644 --- a/tests/functional/forgot_password_test.php +++ b/tests/functional/forgot_password_test.php @@ -17,7 +17,6 @@ class phpbb_functional_forgot_password_test extends phpbb_functional_test_case global $config; $this->add_lang('ucp'); $crawler = $this->request('GET', 'ucp.php?mode=sendpassword'); - $this->assert_response_success(); $this->assertEquals($this->lang('SEND_PASSWORD'), $crawler->filter('h2')->text()); } @@ -38,7 +37,6 @@ class phpbb_functional_forgot_password_test extends phpbb_functional_test_case $this->logout(); $crawler = $this->request('GET', 'ucp.php?mode=sendpassword'); - $this->assert_response_success(); $this->assertContains($this->lang('UCP_PASSWORD_RESET_DISABLED', '', ''), $crawler->text()); } diff --git a/tests/functional/memberlist_test.php b/tests/functional/memberlist_test.php index 92ede8bd04..ef3c9b3298 100644 --- a/tests/functional/memberlist_test.php +++ b/tests/functional/memberlist_test.php @@ -18,17 +18,14 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case // logs in as admin $this->login(); $crawler = $this->request('GET', 'memberlist.php?sid=' . $this->sid); - $this->assert_response_success(); $this->assertContains('memberlist-test-user', $crawler->text()); // restrict by first character $crawler = $this->request('GET', 'memberlist.php?first_char=m&sid=' . $this->sid); - $this->assert_response_success(); $this->assertContains('memberlist-test-user', $crawler->text()); // make sure results for wrong character are not returned $crawler = $this->request('GET', 'memberlist.php?first_char=a&sid=' . $this->sid); - $this->assert_response_success(); $this->assertNotContains('memberlist-test-user', $crawler->text()); } @@ -37,15 +34,12 @@ class phpbb_functional_memberlist_test extends phpbb_functional_test_case $this->login(); // XXX hardcoded user id $crawler = $this->request('GET', 'memberlist.php?mode=viewprofile&u=2&sid=' . $this->sid); - $this->assert_response_success(); $this->assertContains('admin', $crawler->filter('h2')->text()); } protected function get_memberlist_leaders_table_crawler() { $crawler = $this->request('GET', 'memberlist.php?mode=leaders&sid=' . $this->sid); - $this->assert_response_success(); - return $crawler->filter('.forumbg-table'); } diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php index fa668b3cb5..cbc1c76ef8 100644 --- a/tests/functional/metadata_manager_test.php +++ b/tests/functional/metadata_manager_test.php @@ -76,8 +76,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case public function test_extensions_list() { $crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&sid=' . $this->sid); - $this->assert_response_success(); - $this->assertContains($this->lang('EXTENSIONS_EXPLAIN'), $crawler->filter('#main')->text()); $this->assertContains('phpBB 3.1 Extension Testing', $crawler->filter('#main')->text()); $this->assertContains('Details', $crawler->filter('#main')->text()); @@ -86,7 +84,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case public function test_extensions_details() { $crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=foo%2Fbar&sid=' . $this->sid); - $this->assert_response_success(); // Test whether the details are displayed $this->assertContains($this->lang('CLEAN_NAME'), $crawler->filter('#main')->text()); @@ -103,7 +100,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case public function test_extensions_details_notexists() { $crawler = $this->request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=not%2Fexists&sid=' . $this->sid); - $this->assert_response_success(); // Error message because the files do not exist $this->assertContains('The required file does not exist:', $crawler->filter('#main')->text()); diff --git a/tests/functional/notification_test.php b/tests/functional/notification_test.php index fa6513a0ba..ad4f3acdc2 100644 --- a/tests/functional/notification_test.php +++ b/tests/functional/notification_test.php @@ -41,7 +41,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case { $this->login(); $crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options'); - $this->assert_response_success(); $cplist = $crawler->filter('.table1'); if ($expected_status) |