mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
adding test for paginator numbers to prove fix for #2825
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5356 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f3b67a24e1
commit
c00238ec3a
1 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,8 @@
|
|||
require_once LIBS.DS.'view'.DS.'helper.php';
|
||||
require_once LIBS.DS.'view'.DS.'helpers'.DS.'html.php';
|
||||
require_once LIBS.DS.'view'.DS.'helpers'.DS.'ajax.php';
|
||||
require_once LIBS.DS.'view'.DS.'helpers'.DS.'javascript.php';
|
||||
require_once LIBS.DS.'view'.DS.'helpers'.DS.'form.php';
|
||||
require_once LIBS.DS.'view'.DS.'helpers'.DS.'paginator.php';
|
||||
/**
|
||||
* Short description for class.
|
||||
|
@ -63,6 +65,10 @@ class PaginatorTest extends UnitTestCase {
|
|||
);
|
||||
$this->paginator->Html =& new HtmlHelper();
|
||||
$this->paginator->Ajax =& new AjaxHelper();
|
||||
$this->paginator->Ajax->Html =& new HtmlHelper();
|
||||
$this->paginator->Ajax->Javascript =& new JavascriptHelper();
|
||||
$this->paginator->Ajax->Form =& new FormHelper();
|
||||
|
||||
}
|
||||
|
||||
function testHasPrevious() {
|
||||
|
@ -91,6 +97,10 @@ class PaginatorTest extends UnitTestCase {
|
|||
|
||||
$result = $this->paginator->sort('date');
|
||||
$this->assertPattern('/\/accounts\/index\/param\/page:1\/sort:date\/direction:desc"\s*>Date<\/a>$/', $result);
|
||||
|
||||
$result = $this->paginator->numbers(array('url'=> array('controller'=>'projects', 'action'=>'sort'),'update'=>'list'));
|
||||
$this->assertPattern('/\/projects\/sort\/page:1/', $result);
|
||||
$this->assertPattern('/<script type="text\/javascript">Event.observe/', $result);
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
|
|
Loading…
Add table
Reference in a new issue