summaryrefslogtreecommitdiffstats
path: root/tests/lib/db.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 11:07:41 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-10 17:43:09 +0200
commit875c18b115e649dae3a633d197ec8e2c156bbcb6 (patch)
tree5f25ae51fedc9ea95450d9aec2f05081e19dc086 /tests/lib/db.php
parentb66559247a3d4f40a8275e4c199d06763a7957d2 (diff)
downloadnextcloud-server-875c18b115e649dae3a633d197ec8e2c156bbcb6.tar.gz
nextcloud-server-875c18b115e649dae3a633d197ec8e2c156bbcb6.zip
fix fetchRow checks to also work with MDB2
Diffstat (limited to 'tests/lib/db.php')
-rw-r--r--tests/lib/db.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/db.php b/tests/lib/db.php
index 7b2a5e309f0..df390929978 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
}
public function testNOW() {