diff options
Diffstat (limited to 'tests/pagination/pagination_test.php')
-rw-r--r-- | tests/pagination/pagination_test.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index a37d34ad1b..ea6dd999c3 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -188,6 +188,26 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case $this->assertEquals(str_replace("\t", '', $expect), $this->display('test')); } + /** + * @dataProvider generate_template_pagination_data + */ + public function test_generate_template_pagination_double_nested($base_url, $start_name, $num_items, $per_page, $start_item, $expect) + { + // Block needs to be assigned before pagination + $this->template->assign_block_vars('sub', array( + 'FOO' => 'bar', + )); + + $this->template->assign_block_vars('sub.level2', array( + 'BAR' => 'foo', + )); + + $this->pagination->generate_template_pagination($base_url, 'sub.level2.pagination', $start_name, $num_items, $per_page, $start_item); + $this->template->set_filenames(array('test' => 'pagination_double_nested.html')); + + $this->assertEquals(str_replace("\t", '', $expect), $this->display('test')); + } + public function on_page_data() { return array( |