[Pkg-owncloud-commits] [owncloud] 125/172: use fetch method instead of fetchRow because fetchRow is only an owncloud internal alias that exists purely for compability
David Prévot
taffit at moszumanska.debian.org
Sun May 18 20:09:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 9e36c33104213f425941d4788a06889871a590c9
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Wed May 14 01:07:19 2014 +0200
use fetch method instead of fetchRow because fetchRow is only an owncloud internal alias that exists purely for compability
---
lib/public/appframework/db/mapper.php | 6 +++---
tests/lib/appframework/db/MapperTestUtility.php | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/public/appframework/db/mapper.php b/lib/public/appframework/db/mapper.php
index 21ccb68..a23149e 100644
--- a/lib/public/appframework/db/mapper.php
+++ b/lib/public/appframework/db/mapper.php
@@ -225,12 +225,12 @@ abstract class Mapper {
*/
protected function findOneQuery($sql, array $params=array(), $limit=null, $offset=null){
$result = $this->execute($sql, $params, $limit, $offset);
- $row = $result->fetchRow();
+ $row = $result->fetch();
if($row === false || $row === null){
throw new DoesNotExistException('No matching entry found');
}
- $row2 = $result->fetchRow();
+ $row2 = $result->fetch();
//MDB2 returns null, PDO and doctrine false when no row is available
if( ! ($row2 === false || $row2 === null )) {
throw new MultipleObjectsReturnedException('More than one result');
@@ -264,7 +264,7 @@ abstract class Mapper {
$entities = array();
- while($row = $result->fetchRow()){
+ while($row = $result->fetch()){
$entities[] = $this->mapRowToEntity($row);
}
diff --git a/tests/lib/appframework/db/MapperTestUtility.php b/tests/lib/appframework/db/MapperTestUtility.php
index 4c81d4c..fc0e5c2 100644
--- a/tests/lib/appframework/db/MapperTestUtility.php
+++ b/tests/lib/appframework/db/MapperTestUtility.php
@@ -51,7 +51,7 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase {
->getMock();
$this->query = $this->getMock('Query', array('execute', 'bindValue'));
- $this->pdoResult = $this->getMock('Result', array('fetchRow'));
+ $this->pdoResult = $this->getMock('Result', array('fetch'));
$this->queryAt = 0;
$this->prepareAt = 0;
$this->iterators = array();
@@ -65,7 +65,7 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase {
* @param array $arguments the expected arguments for the prepare query
* method
* @param array $returnRows the rows that should be returned for the result
- * of the database query. If not provided, it wont be assumed that fetchRow
+ * of the database query. If not provided, it wont be assumed that fetch
* will be called on the result
*/
protected function setMapperResult($sql, $arguments=array(), $returnRows=array(),
@@ -77,7 +77,7 @@ abstract class MapperTestUtility extends \PHPUnit_Framework_TestCase {
$fetchAt = $this->fetchAt;
$this->pdoResult->expects($this->any())
- ->method('fetchRow')
+ ->method('fetch')
->will($this->returnCallback(
function() use ($iterators, $fetchAt){
$iterator = $iterators[$fetchAt];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list