mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
[ticket/13654] Moving reporting into controller
Moving report.php's content into different services and controllers to better comply with the MVC model. Also implementing: * Replacement for reasons_display() * Adding assign_meta_refresh_var() to \controller\helper * Adding separate routes for easy configuration * Updating unit tests to expect to correct results * Add BC tests PHPBB3-13654
This commit is contained in:
@@ -18,12 +18,13 @@ class phpbb_functional_report_post_captcha_test extends phpbb_functional_test_ca
|
||||
{
|
||||
public function test_guest_report_post()
|
||||
{
|
||||
$crawler = self::request('GET', 'report.php?f=2&p=1');
|
||||
$crawler = self::request('GET', 'app.php/post/1/report', array(), false);
|
||||
$this->assert_response_html(403);
|
||||
$this->add_lang('mcp');
|
||||
$this->assertContains($this->lang('USER_CANNOT_REPORT'), $crawler->filter('html')->text());
|
||||
|
||||
$this->set_reporting_guest(1);
|
||||
$crawler = self::request('GET', 'report.php?f=2&p=1');
|
||||
$crawler = self::request('GET', 'app.php/post/1/report');
|
||||
$this->assertContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
|
||||
$this->set_reporting_guest(-1);
|
||||
}
|
||||
@@ -31,7 +32,7 @@ class phpbb_functional_report_post_captcha_test extends phpbb_functional_test_ca
|
||||
public function test_user_report_post()
|
||||
{
|
||||
$this->login();
|
||||
$crawler = self::request('GET', 'report.php?f=2&p=1');
|
||||
$crawler = self::request('GET', 'app.php/post/1/report');
|
||||
$this->assertNotContains($this->lang('CONFIRM_CODE'), $crawler->filter('html')->text());
|
||||
|
||||
$this->add_lang('mcp');
|
||||
|
Reference in New Issue
Block a user