Skip to content

Commit

Permalink
test case handle with default limit params
Browse files Browse the repository at this point in the history
  • Loading branch information
eather009 committed Feb 25, 2017
1 parent 83501ed commit c762914
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/TestCase/View/Helper/PaginatorHelperTest.php
Expand Up @@ -2594,5 +2594,30 @@ public function testLimitControl()
'/form'
];
$this->assertHtml($expected, $out);

$out = $this->Paginator->limitControl([], null, ['class' => 'form-control']);
$expected = [
['form' => ['method' => 'get', 'accept-charset' => 'utf-8', 'action' => '/']],
['div' => ['class' => 'input select']],
['label' => ['for' => 'limit']],
'View',
'/label',
['select' => ['name' => 'limit', 'id' => 'limit', 'onChange' => 'this.form.submit()', 'class' => 'form-control']],
['option' => ['value' => '']],
'/option',
['option' => ['value' => '20']],
'20',
'/option',
['option' => ['value' => '50']],
'50',
'/option',
['option' => ['value' => '100']],
'100',
'/option',
'/select',
'/div',
'/form'
];
$this->assertHtml($expected, $out);
}
}

0 comments on commit c762914

Please sign in to comment.