diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-11 06:20:27 -0700 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-11 06:20:27 -0700 |
commit | 0eed1c980da1ea3d901d8e495c7a37bb5aac0cff (patch) | |
tree | 828dc2525d2236ffe38e3998d27313f924c95303 /tests/lib/db.php | |
parent | db6080c5c682a2bbdc420399276b81311c17802c (diff) | |
parent | 875c18b115e649dae3a633d197ec8e2c156bbcb6 (diff) | |
download | nextcloud-server-0eed1c980da1ea3d901d8e495c7a37bb5aac0cff.tar.gz nextcloud-server-0eed1c980da1ea3d901d8e495c7a37bb5aac0cff.zip |
Merge pull request #3652 from owncloud/fix_fetchrow_usage_for_mdb2
fix fetchRow checks to also work with MDB2
Diffstat (limited to 'tests/lib/db.php')
-rw-r--r-- | tests/lib/db.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/db.php b/tests/lib/db.php index 3c38acb558b..afbdb413c3d 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -37,7 +37,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { $result = $query->execute(array('uri_1')); $this->assertTrue((bool)$result); $row = $result->fetchRow(); - $this->assertFalse($row); + $this->assertFalse((bool)$row); //PDO returns false, MDB2 returns null $query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (?,?)'); $result = $query->execute(array('fullname test', 'uri_1')); $this->assertTrue((bool)$result); @@ -48,7 +48,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { $this->assertArrayHasKey('fullname', $row); $this->assertEquals($row['fullname'], 'fullname test'); $row = $result->fetchRow(); - $this->assertFalse($row); + $this->assertFalse((bool)$row); //PDO returns false, MDB2 returns null } /** |