mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/12370] Fix functional notification test and remove unneeded requests
PHPBB3-12370
This commit is contained in:
parent
3315702b5f
commit
708db0f05c
1 changed files with 3 additions and 6 deletions
|
@ -59,20 +59,17 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
|
||||||
$this->create_user('notificationtestuser');
|
$this->create_user('notificationtestuser');
|
||||||
$this->add_user_group('NEWLY_REGISTERED', array('notificationtestuser'));
|
$this->add_user_group('NEWLY_REGISTERED', array('notificationtestuser'));
|
||||||
$this->login('notificationtestuser');
|
$this->login('notificationtestuser');
|
||||||
$crawler = self::request('GET', 'index.php');
|
|
||||||
$this->assertContains('notificationtestuser', $crawler->filter('#username_logged_in')->text());
|
|
||||||
|
|
||||||
// Post a new post that needs approval
|
// Post a new post that needs approval
|
||||||
$this->create_post(2, 1, 'Re: Welcome to phpBB3', 'This is a test [b]post[/b] posted by notificationtestuser.', array(), 'POST_STORED_MOD');
|
$this->create_post(2, 1, 'Re: Welcome to phpBB3', 'This is a test [b]post[/b] posted by notificationtestuser.', array(), 'POST_STORED_MOD');
|
||||||
$crawler = self::request('GET', "viewtopic.php?t=1&sid={$this->sid}");
|
$crawler = self::request('GET', "viewtopic.php?t=1&sid={$this->sid}");
|
||||||
$this->assertNotContains('This is a test post posted by notificationtestuser.', $crawler->filter('html')->text());
|
$this->assertNotContains('This is a test post posted by notificationtestuser.', $crawler->filter('html')->text());
|
||||||
|
|
||||||
// logout
|
// Login as admin
|
||||||
$crawler = self::request('GET', 'ucp.php?sid=' . $this->sid . '&mode=logout');
|
$this->logout();
|
||||||
|
|
||||||
// admin login
|
|
||||||
$this->login();
|
$this->login();
|
||||||
$this->add_lang('ucp');
|
$this->add_lang('ucp');
|
||||||
|
|
||||||
$crawler = self::request('GET', 'ucp.php?i=ucp_notifications');
|
$crawler = self::request('GET', 'ucp.php?i=ucp_notifications');
|
||||||
|
|
||||||
// At least one notification should exist
|
// At least one notification should exist
|
||||||
|
|
Loading…
Add table
Reference in a new issue