From c762914faa8ca134257d344c4c13154599f0a23c Mon Sep 17 00:00:00 2001 From: Iftekhar Eather Date: Sat, 25 Feb 2017 19:17:51 +0600 Subject: [PATCH] test case handle with default limit params --- .../View/Helper/PaginatorHelperTest.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/TestCase/View/Helper/PaginatorHelperTest.php b/tests/TestCase/View/Helper/PaginatorHelperTest.php index dfc9fd5c35a..2c32ec5cbf8 100644 --- a/tests/TestCase/View/Helper/PaginatorHelperTest.php +++ b/tests/TestCase/View/Helper/PaginatorHelperTest.php @@ -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); } }