mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Add additional test.
This commit is contained in:
parent
dc70da9d14
commit
f63d955f73
2 changed files with 11 additions and 2 deletions
|
@ -1017,6 +1017,16 @@ class PaginatorHelperTest extends CakeTestCase {
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $expected);
|
$this->assertTags($result, $expected);
|
||||||
|
|
||||||
|
$result = $this->Paginator->prev('<i class="fa fa-angle-left"></i>', array('escape' => false), null, array('escape' => true));
|
||||||
|
$expected = array(
|
||||||
|
'span' => array('class' => 'prev'),
|
||||||
|
'a' => array('href' => '/', 'rel' => 'prev'),
|
||||||
|
'<i class="fa fa-angle-left"></i>',
|
||||||
|
'/a',
|
||||||
|
'/span'
|
||||||
|
);
|
||||||
|
$this->assertTags($result, $expected);
|
||||||
|
|
||||||
$result = $this->Paginator->prev('<< Previous', null, '<strong>Disabled</strong>');
|
$result = $this->Paginator->prev('<< Previous', null, '<strong>Disabled</strong>');
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'span' => array('class' => 'prev'),
|
'span' => array('class' => 'prev'),
|
||||||
|
|
|
@ -499,8 +499,7 @@ class PaginatorHelper extends AppHelper {
|
||||||
if (!empty($disabledTitle) && $disabledTitle !== true) {
|
if (!empty($disabledTitle) && $disabledTitle !== true) {
|
||||||
$title = $disabledTitle;
|
$title = $disabledTitle;
|
||||||
}
|
}
|
||||||
|
$options = (array)$disabledOptions + array_intersect_key($options, $_defaults) + $_defaults;
|
||||||
$options = (array)$disabledOptions + array_intersect_key($options, array_keys($_defaults)) + $_defaults;
|
|
||||||
} elseif (!$this->{$check}($options['model'])) {
|
} elseif (!$this->{$check}($options['model'])) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue