diff options
Diffstat (limited to 'tests/functional/paging_test.php')
-rw-r--r-- | tests/functional/paging_test.php | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php index 91f14cb75d..cfaf9104a8 100644 --- a/tests/functional/paging_test.php +++ b/tests/functional/paging_test.php @@ -1,9 +1,13 @@ <?php /** * -* @package testing -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -18,22 +22,22 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case $this->login(); $post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.'); - for ($post_id = 1; $post_id <= 11; $post_id++) + for ($post_id = 1; $post_id <= 16; $post_id++) { $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}"); - $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no11', $crawler->text()); + $this->assertContains('post no4', $crawler->text()); + $this->assertNotContains('post no16', $crawler->text()); - $next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href'); + $next_link = $crawler->filter('.pagination > ul > li.next > a')->attr('href'); $crawler = self::request('GET', $next_link); - $this->assertContains('post no11', $crawler->text()); - $this->assertNotContains('post no9', $crawler->text()); + $this->assertNotContains('post no4', $crawler->text()); + $this->assertContains('post no16', $crawler->text()); - $prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href'); + $prev_link = $crawler->filter('.pagination > ul > li.previous > a')->attr('href'); $crawler = self::request('GET', $prev_link); - $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no11', $crawler->text()); + $this->assertContains('post no4', $crawler->text()); + $this->assertNotContains('post no16', $crawler->text()); } } |