Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…onstant use over magic constant: see zendframework/zendframework#5505 for reference
  • Loading branch information
Ocramius committed Dec 5, 2014
1 parent 347a3f5 commit 3281a35
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/PaginatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Zend\Filter;
use Zend\Paginator;
use Zend\Paginator\Adapter;
use Zend\Paginator\Adapter\DbSelect;
use Zend\Paginator\Exception;
use Zend\View;
use Zend\View\Helper;
Expand Down Expand Up @@ -439,7 +440,11 @@ public function testGetsItemsByPageHandleDbSelectAdapter()
new ArrayObject(array('foo' => 'bar')),
new ArrayObject(array('foo' => 'bar')),
));
$result->expects($this->once())->method('current')->will($this->returnValue(array('c' => 3)));

$result
->expects($this->once())
->method('current')
->will($this->returnValue(array(DbSelect::ROW_COUNT_COLUMN_NAME => 3)));
$result->expects($this->once())->method('current')->will($this->returnValue($resultSet->getDataSource()));

$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -463,7 +468,7 @@ public function testGetsItemsByPageHandleDbSelectAdapter()
->will($this->returnValue($mockStatement));
$mockSelect = $this->getMock('Zend\Db\Sql\Select');

$dbSelect = new Paginator\Adapter\DbSelect($mockSelect, $mockSql);
$dbSelect = new DbSelect($mockSelect, $mockSql);
$this->assertInstanceOf('ArrayIterator', $resultSet->getDataSource());

$paginator = new Paginator\Paginator($dbSelect);
Expand Down

0 comments on commit 3281a35

Please sign in to comment.