mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/9341] Follow the Next/Prev link in tests
follow the next/prev link and then assert if the page contains its last post or not PHPBB3-9341
This commit is contained in:
parent
69001902b9
commit
22998ee5ee
1 changed files with 9 additions and 5 deletions
|
@ -23,11 +23,15 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case
|
|||
$this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.');
|
||||
}
|
||||
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
|
||||
$link = $crawler->filter('#viewtopic > fieldset > a')->attr('href');
|
||||
$crawler = self::request('GET', $link);
|
||||
$this->assertContains('post no9', $crawler->text());
|
||||
|
||||
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}&start=10");
|
||||
$link = $crawler->filter('#viewtopic > fieldset > a')->attr('href');
|
||||
$crawler = self::request('GET', $link);
|
||||
$next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href');
|
||||
$crawler = self::request('GET', $next_link);
|
||||
$this->assertContains('post no19', $crawler->text());
|
||||
|
||||
|
||||
$prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href');
|
||||
$crawler = self::request('GET', $prev_link);
|
||||
$this->assertContains('post no9', $crawler->text());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue