1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

[ticket/11568] Remove manual calls to assert_response_success()

PHPBB3-11568
This commit is contained in:
Joas Schilling 2013-05-27 22:12:50 +02:00
parent 135139aca9
commit e77c8ee4ef
3 changed files with 1 additions and 11 deletions

View File

@ -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());
}
}

View File

@ -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());
}
}

View File

@ -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();