Skip to content
This repository
Browse code

Fix incomplete patch 61dd109

  • Loading branch information...
commit 56a0eb04b799bd01b8c9d32698fef1725785ee7f 1 parent 7ea3ee4
ADmad authored
10  lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
@@ -1690,6 +1690,16 @@ public function testNumbers() {
1690 1690
 		);
1691 1691
 		$this->assertTags($result, $expected);
1692 1692
 
  1693
+		$result = $this->Paginator->numbers(array('modulus' => 3, 'currentTag' => 'span', 'tag' => 'li'));
  1694
+		$expected = array(
  1695
+			array('li' => array('class' => 'current')), array('span' => array()), '1', '/span', '/li',
  1696
+			' | ',
  1697
+			array('li' => array()), array('a' => array('href' => '/index/page:2')), '2', '/a', '/li',
  1698
+			' | ',
  1699
+			array('li' => array()), array('a' => array('href' => '/index/page:3')), '3', '/a', '/li',
  1700
+		);
  1701
+		$this->assertTags($result, $expected);
  1702
+
1693 1703
 		$this->Paginator->request->params['paging'] = array(
1694 1704
 			'Client' => array(
1695 1705
 				'page' => 2,
6  lib/Cake/View/Helper/PaginatorHelper.php
@@ -753,7 +753,11 @@ public function numbers($options = array()) {
753 753
 					if ($class) {
754 754
 						$currentClass .= ' ' . $class;
755 755
 					}
756  
-					$out .= $this->Html->tag($tag, $i, array('class' => $currentClass));
  756
+					if ($currentTag) {
  757
+						$out .= $this->Html->tag($tag, $this->Html->tag($currentTag, $i), array('class' => $currentClass));
  758
+					} else {
  759
+						$out .= $this->Html->tag($tag, $i, array('class' => $currentClass));
  760
+					}
757 761
 				} else {
758 762
 					$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
759 763
 				}

0 notes on commit 56a0eb0

Please sign in to comment.
Something went wrong with that request. Please try again.