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

Commit

Permalink
[#4169] Additional CS fixes
Browse files Browse the repository at this point in the history
- per php-cs-fixer
  • Loading branch information
weierophinney committed Apr 12, 2013
1 parent e2e5fd7 commit 77fadf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Paginator/Adapter/DbTableGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(TableGateway $tableGateway, $where = null, $order =
if ($order) {
$select->order($order);
}

$dbAdapter = $tableGateway->getAdapter();
$resultSetPrototype = $tableGateway->getResultSetPrototype();

Expand Down
16 changes: 8 additions & 8 deletions tests/ZendTest/Paginator/Adapter/DbTableGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class DbTableGatewayTest extends \PHPUnit_Framework_TestCase

/** @var DbTableGateway */
protected $dbTableGateway;

protected $mockTableGateway;

public function setup()
{
$mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface');
Expand All @@ -50,14 +50,14 @@ public function setup()
);

$this->mockStatement = $mockStatement;

$this->mockTableGateway = $mockTableGateway;
}

public function testGetItems()
{
$this->dbTableGateway = new DbTableGateway($this->mockTableGateway);

$mockResult = $this->getMock('Zend\Db\Adapter\Driver\ResultInterface');
$this->mockStatement
->expects($this->any())
Expand All @@ -71,7 +71,7 @@ public function testGetItems()
public function testCount()
{
$this->dbTableGateway = new DbTableGateway($this->mockTableGateway);

$mockResult = $this->getMock('Zend\Db\Adapter\Driver\ResultInterface');
$mockResult->expects($this->any())
->method('current')
Expand All @@ -84,19 +84,19 @@ public function testCount()
$count = $this->dbTableGateway->count();
$this->assertEquals(10, $count);
}

public function testGetItemsWithWhereAndOrder()
{
$where = "foo = bar";
$order = "foo";
$this->dbTableGateway = new DbTableGateway($this->mockTableGateway, $where, $order);

$mockResult = $this->getMock('Zend\Db\Adapter\Driver\ResultInterface');
$this->mockStatement
->expects($this->any())
->method('execute')
->will($this->returnValue($mockResult));

$items = $this->dbTableGateway->getItems(2, 10);
$this->assertInstanceOf('Zend\Db\ResultSet\ResultSet', $items);
}
Expand Down

0 comments on commit 77fadf8

Please sign in to comment.