]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #3652 from owncloud/fix_fetchrow_usage_for_mdb2
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 11 Jun 2013 13:20:27 +0000 (06:20 -0700)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 11 Jun 2013 13:20:27 +0000 (06:20 -0700)
fix fetchRow checks to also work with MDB2

1  2 
tests/lib/db.php

index 3c38acb558b16f6939d584ef3846f3e855dcf606,df39092997855df7e4149c46afdfe11c29ba4930..afbdb413c3d7e61e64adcad3b7a2588d8cf98c6a
@@@ -48,12 -48,9 +48,12 @@@ class Test_DB extends PHPUnit_Framework
                $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
        }
  
 +      /**
 +       * @medium
 +       */
        public function testNOW() {
                $query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (NOW(),?)');
                $result = $query->execute(array('uri_2'));