aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pagination
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-01-24 14:27:04 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-01-24 14:27:04 +0100
commitee03b4f1efc5f8e2a6aa3352aacfff48d1609645 (patch)
tree8f448ebc8c1e16401b60fef719501b6cd58cea2d /tests/pagination
parent7014d824f010ced8e9930dc149bb2cde953e3d77 (diff)
downloadforums-ee03b4f1efc5f8e2a6aa3352aacfff48d1609645.tar
forums-ee03b4f1efc5f8e2a6aa3352aacfff48d1609645.tar.gz
forums-ee03b4f1efc5f8e2a6aa3352aacfff48d1609645.tar.bz2
forums-ee03b4f1efc5f8e2a6aa3352aacfff48d1609645.tar.xz
forums-ee03b4f1efc5f8e2a6aa3352aacfff48d1609645.zip
[ticket/13538] Fix tests for pagination in nested loop
PHPBB3-13538
Diffstat (limited to 'tests/pagination')
-rw-r--r--tests/pagination/pagination_test.php5
-rw-r--r--tests/pagination/templates/pagination_sub.html4
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index ca42fa806f..a37d34ad1b 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -177,6 +177,11 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
*/
public function test_generate_template_pagination_sub($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->pagination->generate_template_pagination($base_url, 'sub.pagination', $start_name, $num_items, $per_page, $start_item);
$this->template->set_filenames(array('test' => 'pagination_sub.html'));
diff --git a/tests/pagination/templates/pagination_sub.html b/tests/pagination/templates/pagination_sub.html
index 1d87940e5d..4ec14039e0 100644
--- a/tests/pagination/templates/pagination_sub.html
+++ b/tests/pagination/templates/pagination_sub.html
@@ -11,7 +11,7 @@ pagination
<!-- ELSE -->:else:{sub.pagination.PAGE_NUMBER}:{sub.pagination.PAGE_URL}
<!-- ENDIF -->
<!-- END pagination -->
-<!-- IF U_PREVIOUS_PAGE -->:u_prev:{sub.U_PREVIOUS_PAGE}<!-- ENDIF -->
+<!-- IF sub.U_PREVIOUS_PAGE -->:u_prev:{sub.U_PREVIOUS_PAGE}<!-- ENDIF -->
-<!-- IF U_NEXT_PAGE -->:u_next:{sub.U_NEXT_PAGE}<!-- ENDIF -->
+<!-- IF sub.U_NEXT_PAGE -->:u_next:{sub.U_NEXT_PAGE}<!-- ENDIF -->
<!-- END sub -->