mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding Paginator test case for disabled links (Ticket #3253)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5774 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
4e795bc22c
commit
dcdfa005cf
1 changed files with 10 additions and 2 deletions
|
@ -81,12 +81,20 @@ class PaginatorTest extends UnitTestCase {
|
|||
$this->Paginator->params['paging']['Article']['nextPage'] = true;
|
||||
}
|
||||
|
||||
function testDisabledLink() {
|
||||
$this->Paginator->params['paging']['Article']['nextPage'] = false;
|
||||
$this->Paginator->params['paging']['Article']['page'] = 1;
|
||||
$result = $this->Paginator->next('Next', array(), true);
|
||||
$expected = '<div>Next</div>';
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
function testSortLinks() {
|
||||
Router::reload();
|
||||
Router::parse('/');
|
||||
Router::setRequestInfo(array(
|
||||
array ('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'form' => array(), 'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true'), 'bare' => 0),
|
||||
array ('plugin' => null, 'controller' => null, 'action' => null, 'base' => '/officespace', 'here' => '/officespace/accounts/', 'webroot' => '/officespace/', 'passedArgs' => array())
|
||||
array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'form' => array(), 'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true'), 'bare' => 0),
|
||||
array('plugin' => null, 'controller' => null, 'action' => null, 'base' => '/officespace', 'here' => '/officespace/accounts/', 'webroot' => '/officespace/', 'passedArgs' => array())
|
||||
));
|
||||
$this->Paginator->options(array('url' => array('param')));
|
||||
$result = $this->Paginator->sort('title');
|
||||
|
|
Loading…
Reference in a new issue