mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/17212] Extend viewonline test for editing post
PHPBB3-17212
This commit is contained in:
parent
c098468699
commit
92e678a116
1 changed files with 17 additions and 1 deletions
|
@ -81,6 +81,22 @@ class phpbb_functional_viewonline_test extends phpbb_functional_test_case
|
||||||
$this->assertStringContainsString('viewonline-test-user1', $crawler->text());
|
$this->assertStringContainsString('viewonline-test-user1', $crawler->text());
|
||||||
$this->assertStringContainsString($this->lang('POSTING_MESSAGE', $this->get_forum_name_by_forum_id(2)), $crawler->text());
|
$this->assertStringContainsString($this->lang('POSTING_MESSAGE', $this->get_forum_name_by_forum_id(2)), $crawler->text());
|
||||||
|
|
||||||
|
// Log in as test user
|
||||||
|
self::$client->restart();
|
||||||
|
$this->login('viewonline-test-user1');
|
||||||
|
$test_post_data = $this->create_post(2, 1, 'Viewonline test post #1', 'Viewonline test post message');
|
||||||
|
$crawler = self::request('GET', 'posting.php?mode=edit&p=' . $test_post_data['post_id'] . '&sid=' . $this->sid);
|
||||||
|
$this->assertContainsLang('EDIT_POST', $crawler->text());
|
||||||
|
// Log in as another user
|
||||||
|
self::$client->restart();
|
||||||
|
$this->login();
|
||||||
|
// PHP goes faster than DBMS, make sure session data got written to the database
|
||||||
|
sleep(1);
|
||||||
|
$crawler = self::request('GET', 'viewonline.php?sid=' . $this->sid);
|
||||||
|
// Make sure posting message page is in the list
|
||||||
|
$this->assertStringContainsString('viewonline-test-user1', $crawler->text());
|
||||||
|
$this->assertStringContainsString($this->lang('POSTING_MESSAGE', $this->get_forum_name_by_forum_id(2)), $crawler->text());
|
||||||
|
|
||||||
// Log in as test user
|
// Log in as test user
|
||||||
self::$client->restart();
|
self::$client->restart();
|
||||||
$this->login('viewonline-test-user1');
|
$this->login('viewonline-test-user1');
|
||||||
|
|
Loading…
Add table
Reference in a new issue