mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
More tests for ajax link delegation.
This commit is contained in:
parent
bf566e1aad
commit
9e08196c76
1 changed files with 13 additions and 1 deletions
|
@ -1830,7 +1830,7 @@ class PaginatorHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testAjaxLinkGeneration() {
|
||||
function testAjaxLinkGenerationNumbers() {
|
||||
$this->Paginator->Js->expectCallCount('link', 2);
|
||||
$result = $this->Paginator->numbers(array(
|
||||
'modulus'=> '2',
|
||||
|
@ -1839,6 +1839,18 @@ class PaginatorHelperTest extends CakeTestCase {
|
|||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* test that paginatorHelper::link() uses JsHelper to make links when 'update' key is present
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testAjaxLinkGenerationLink() {
|
||||
$this->Paginator->Js->expectCallCount('link', 1);
|
||||
$this->Paginator->Js->setReturnValue('link', 'I am a link');
|
||||
$result = $this->Paginator->link('test', array('controller' => 'posts'), array('update' => '#content'));
|
||||
$this->assertEqual($result, 'I am a link');
|
||||
}
|
||||
|
||||
/**
|
||||
* test that mock classes injected into paginatorHelper are called when using link()
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue