Skip to content
Permalink
Browse files

Add tests for #7516

  • Loading branch information...
markstory committed Oct 11, 2015
1 parent 7bf6768 commit 29490eb84f4491a68c45bed515a2715148301114
Showing with 25 additions and 0 deletions.
  1. +25 −0 lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
@@ -2927,4 +2927,29 @@ public function testMetaPage10Last() {
$this->assertSame($expected, $result);
}
/**
* Verify that meta() uses URL options
*
* @return void
*/
public function testMetaPageUrlOptions() {
$this->Paginator->options(array(
'url' => array('?' => array('a' => 'b'))
));
$this->Paginator->request['paging'] = array(
'Article' => array(
'page' => 5,
'prevPage' => true,
'nextPage' => true,
'pageCount' => 10,
'options' => array(),
'paramType' => 'querystring'
)
);
$expected = '<link href="/?a=b&amp;page=4" rel="prev"/>';
$expected .= '<link href="/?a=b&amp;page=6" rel="next"/>';
$result = $this->Paginator->meta();
$this->assertSame($expected, $result);
}
}

0 comments on commit 29490eb

Please sign in to comment.
You can’t perform that action at this time.