From 548a07d508e5732b9edd496326da41c9c5d425c4 Mon Sep 17 00:00:00 2001 From: Ralph Schindler Date: Fri, 4 Jan 2013 16:42:21 -0600 Subject: [PATCH] Added test to ensure reset('order') was called in Paginator's DbSelect adapter --- test/Adapter/DbSelectTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Adapter/DbSelectTest.php b/test/Adapter/DbSelectTest.php index a3173d3..8a4e0fa 100644 --- a/test/Adapter/DbSelectTest.php +++ b/test/Adapter/DbSelectTest.php @@ -62,6 +62,7 @@ public function testCount() { $this->mockSelect->expects($this->once())->method('columns')->with($this->equalTo(array('c' => new Expression('COUNT(1)')))); $this->mockResult->expects($this->any())->method('current')->will($this->returnValue(array('c' => 5))); + $this->mockSelect->expects($this->exactly(4))->method('reset'); // called for columns, limit, offset, order $count = $this->dbSelect->count(); $this->assertEquals(5, $count); }