[ticket/11720] Add functional test for submitting report as user

The already existing functional tests were not ran as the filename was
missing the appended "_test".

PHPBB3-11720
This commit is contained in:
Marc Alexander 2013-07-20 22:35:45 +02:00
parent 56df3fd8ca
commit 865bf0db3d

View file

@ -12,13 +12,6 @@
*/
class phpbb_functional_report_post_captcha_test extends phpbb_functional_test_case
{
public function test_user_report_post()
{
$this->login();
$crawler = self::request('GET', 'report.php?f=2&p=1');
$this->assertNotContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
}
public function test_guest_report_post()
{
$crawler = self::request('GET', 'report.php?f=2&p=1');
@ -31,6 +24,18 @@ class phpbb_functional_report_post_captcha_test extends phpbb_functional_test_ca
$this->set_reporting_guest(-1);
}
public function test_user_report_post()
{
$this->login();
$crawler = self::request('GET', 'report.php?f=2&p=1');
$this->assertNotContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
$this->add_lang('mcp');
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$crawler = self::submit($form);
$this->assertContains($this->lang('POST_REPORTED_SUCCESS'), $crawler->text());
}
protected function set_reporting_guest($report_post_allowed)
{
$this->login();