[ticket/12370] Fix functional notification test and remove unneeded requests

PHPBB3-12370
This commit is contained in:
Joas Schilling 2014-04-07 19:42:18 +02:00
parent 3315702b5f
commit 708db0f05c

View file

@ -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