diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-05-28 14:51:06 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-05-28 14:51:06 +0200 |
| commit | 6d9888be6504dee73341832c7de3d085f09da983 (patch) | |
| tree | f22cda54ae82ca3507bc5f37264b4c32e0775674 /tests/functional | |
| parent | fc1c7211ab3c8766b538625236a7f9628dc8ffb2 (diff) | |
| parent | e84fb0c6cacdd4da2542bb94e5994d1962930ca4 (diff) | |
| download | forums-6d9888be6504dee73341832c7de3d085f09da983.tar forums-6d9888be6504dee73341832c7de3d085f09da983.tar.gz forums-6d9888be6504dee73341832c7de3d085f09da983.tar.bz2 forums-6d9888be6504dee73341832c7de3d085f09da983.tar.xz forums-6d9888be6504dee73341832c7de3d085f09da983.zip | |
Merge branch 'ticket/11568' into ticket/11568-develop
* ticket/11568:
[ticket/11568] Add method to get page content
[ticket/11568] Allow different status codes
[ticket/11568] Trim the output to allow Tabs before INCLUDE overall_header
[ticket/11568] Fix common_groups_test.php form handling
[ticket/11568] Make CookieJar static aswell
[ticket/11568] Remove manual calls to assert_response_success()
[ticket/11568] Only use a static version of the client
[ticket/11568] Any output before the doc type means there was an error
[ticket/11568] Set client manually so we can increase the cURL timeout
[ticket/11568] Use Goutte Client to install the board for functional tests
Conflicts:
tests/test_framework/phpbb_functional_test_case.php
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/auth_test.php | 4 | ||||
| -rw-r--r-- | tests/functional/browse_test.php | 3 | ||||
| -rw-r--r-- | tests/functional/common_groups_test.php | 3 | ||||
| -rw-r--r-- | tests/functional/posting_test.php | 5 |
4 files changed, 2 insertions, 13 deletions
diff --git a/tests/functional/auth_test.php b/tests/functional/auth_test.php index f92a4a2210..8359bbe8ea 100644 --- a/tests/functional/auth_test.php +++ b/tests/functional/auth_test.php @@ -18,7 +18,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case // check for logout link $crawler = $this->request('GET', 'index.php'); - $this->assert_response_success(); $this->assertContains($this->lang('LOGOUT_USER', 'admin'), $crawler->filter('.navbar')->text()); } @@ -27,7 +26,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case $this->create_user('anothertestuser'); $this->login('anothertestuser'); $crawler = $this->request('GET', 'index.php'); - $this->assert_response_success(); $this->assertContains('anothertestuser', $crawler->filter('.icon-logout')->text()); } @@ -41,12 +39,10 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case // logout $crawler = $this->request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout'); - $this->assert_response_success(); $this->assertContains($this->lang('LOGOUT_REDIRECT'), $crawler->filter('#message')->text()); // look for a register link, which should be visible only when logged out $crawler = $this->request('GET', 'index.php'); - $this->assert_response_success(); $this->assertContains($this->lang('REGISTER'), $crawler->filter('.navbar')->text()); } diff --git a/tests/functional/browse_test.php b/tests/functional/browse_test.php index b5748059c6..26c18c4c1f 100644 --- a/tests/functional/browse_test.php +++ b/tests/functional/browse_test.php @@ -15,21 +15,18 @@ class phpbb_functional_browse_test extends phpbb_functional_test_case public function test_index() { $crawler = $this->request('GET', 'index.php'); - $this->assert_response_success(); $this->assertGreaterThan(0, $crawler->filter('.topiclist')->count()); } public function test_viewforum() { $crawler = $this->request('GET', 'viewforum.php?f=2'); - $this->assert_response_success(); $this->assertGreaterThan(0, $crawler->filter('.topiclist')->count()); } public function test_viewtopic() { $crawler = $this->request('GET', 'viewtopic.php?t=1'); - $this->assert_response_success(); $this->assertGreaterThan(0, $crawler->filter('.postbody')->count()); } } diff --git a/tests/functional/common_groups_test.php b/tests/functional/common_groups_test.php index cc6afa54b9..0f376f2705 100644 --- a/tests/functional/common_groups_test.php +++ b/tests/functional/common_groups_test.php @@ -42,10 +42,9 @@ abstract class phpbb_functional_common_groups_test extends phpbb_functional_test // Manage Administrators group $crawler = $this->request('GET', $this->get_url() . '&g=5&sid=' . $this->sid); - $this->assert_response_success(); $form = $crawler->selectButton($this->lang('SUBMIT'))->form(); $form['group_colour']->setValue($input); - $crawler = $this->client->submit($form); + $crawler = $this->submit($form); $this->assertContains($this->lang($expected), $crawler->text()); } } diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index d05207edf0..5cf7559245 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -30,7 +30,6 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case // Test quoting a message $crawler = $this->request('GET', "posting.php?mode=quote&f=2&t={$post2['topic_id']}&p={$post2['post_id']}&sid={$this->sid}"); - $this->assert_response_success(); $this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text()); } @@ -95,7 +94,6 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case $this->add_lang('posting'); $crawler = $this->request('GET', $posting_url); - $this->assert_response_success(); $this->assertContains($this->lang($posting_contains), $crawler->filter('html')->text()); $hidden_fields = array( @@ -119,8 +117,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case // I use a request because the form submission method does not allow you to send data that is not // contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs) // Instead, I send it as a request with the submit button "post" set to true. - $crawler = $this->client->request('POST', $posting_url, $form_data); - $this->assert_response_success(); + $crawler = $this->request('POST', $posting_url, $form_data); $this->assertContains($this->lang('POST_STORED'), $crawler->filter('html')->text()); $url = $crawler->selectLink($this->lang('VIEW_MESSAGE', '', ''))->link()->getUri(); |
