From 0fc150118f6f54c20bc35b018a7451fceebbcdbf Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 11 Mar 2013 13:19:27 -0500 Subject: [PATCH] [#3878] CS fixes - linefeed, trailing spaces --- .../Zend/Paginator/Adapter/DbTableGateway.php | 4 +- .../Paginator/Adapter/DbTableGatewayTest.php | 60 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/library/Zend/Paginator/Adapter/DbTableGateway.php b/library/Zend/Paginator/Adapter/DbTableGateway.php index 90a51ed07a3..1fc017e6dd1 100644 --- a/library/Zend/Paginator/Adapter/DbTableGateway.php +++ b/library/Zend/Paginator/Adapter/DbTableGateway.php @@ -16,7 +16,7 @@ class DbTableGateway extends DbSelect { /** * Construnct - * + * * @param TableGateway $tableGateway * @param Where|\Closure|string|array $where */ @@ -25,7 +25,7 @@ public function __construct(TableGateway $tableGateway, $where = null) $select = $tableGateway->getSql()->select($where); $dbAdapter = $tableGateway->getAdapter(); $resultSetPrototype = $tableGateway->getResultSetPrototype(); - + parent::__construct($select, $dbAdapter, $resultSetPrototype); } } diff --git a/tests/ZendTest/Paginator/Adapter/DbTableGatewayTest.php b/tests/ZendTest/Paginator/Adapter/DbTableGatewayTest.php index 8a9c2e681c8..5a7ca9b1645 100644 --- a/tests/ZendTest/Paginator/Adapter/DbTableGatewayTest.php +++ b/tests/ZendTest/Paginator/Adapter/DbTableGatewayTest.php @@ -14,67 +14,67 @@ use Zend\Paginator\Adapter\DbSelect; use Zend\Db\ResultSet\ResultSet; -/** - * @group Zend_Paginator +/** + * @group Zend_Paginator */ class DbTableGatewayTest extends \PHPUnit_Framework_TestCase { - /** @var \PHPUnit_Framework_MockObject_MockObject */ - protected $mockStatement; - - /** @var DbTableGateway */ + /** @var \PHPUnit_Framework_MockObject_MockObject */ + protected $mockStatement; + + /** @var DbTableGateway */ protected $dbTableGateway; - - public function setup() - { - $mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface'); - $mockDriver = $this->getMock('Zend\Db\Adapter\Driver\DriverInterface'); + + public function setup() + { + $mockStatement = $this->getMock('Zend\Db\Adapter\Driver\StatementInterface'); + $mockDriver = $this->getMock('Zend\Db\Adapter\Driver\DriverInterface'); $mockDriver->expects($this->any()) ->method('createStatement') - ->will($this->returnValue($mockStatement)); - $mockPlatform = $this->getMock('Zend\Db\Adapter\Platform\PlatformInterface'); + ->will($this->returnValue($mockStatement)); + $mockPlatform = $this->getMock('Zend\Db\Adapter\Platform\PlatformInterface'); $mockPlatform->expects($this->any()) ->method('getName') - ->will($this->returnValue('platform')); + ->will($this->returnValue('platform')); $mockAdapter = $this->getMockForAbstractClass( - 'Zend\Db\Adapter\Adapter', + 'Zend\Db\Adapter\Adapter', array($mockDriver, $mockPlatform) - ); - + ); + $tableName = 'foobar'; $mockTableGateway = $this->getMockForAbstractClass( 'Zend\Db\TableGateway\TableGateway', array($tableName, $mockAdapter) ); - + $this->mockStatement = $mockStatement; - $this->dbTableGateway = new DbTableGateway($mockTableGateway); + $this->dbTableGateway = new DbTableGateway($mockTableGateway); } - - public function testGetItems() - { + + public function testGetItems() + { $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); + $this->assertInstanceOf('Zend\Db\ResultSet\ResultSet', $items); } - + public function testCount() - { + { $mockResult = $this->getMock('Zend\Db\Adapter\Driver\ResultInterface'); $mockResult->expects($this->any()) ->method('current') ->will($this->returnValue(array('c' => 10))); - + $this->mockStatement->expects($this->any()) ->method('execute') ->will($this->returnValue($mockResult)); - - $count = $this->dbTableGateway->count(); - $this->assertEquals(10, $count); + + $count = $this->dbTableGateway->count(); + $this->assertEquals(10, $count); } }