mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +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.');
|
$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}");
|
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}");
|
||||||
$link = $crawler->filter('#viewtopic > fieldset > a')->attr('href');
|
$this->assertContains('post no9', $crawler->text());
|
||||||
$crawler = self::request('GET', $link);
|
|
||||||
|
|
||||||
$crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}&start=10");
|
$next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href');
|
||||||
$link = $crawler->filter('#viewtopic > fieldset > a')->attr('href');
|
$crawler = self::request('GET', $next_link);
|
||||||
$crawler = self::request('GET', $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