diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-06-28 07:15:38 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-06-28 07:15:38 -0700 |
commit | b1a2ddd1498f97129f5f425a77cc88879205357d (patch) | |
tree | 12f58228dbd1aa01636d5e4a1d0ce9eb22ced607 /tests | |
parent | 3bedb097537618fbdd462b9e77ac68e0b3d2302f (diff) | |
parent | 45c897acf34151672d68ee767ff15ab010676335 (diff) | |
download | nextcloud-server-b1a2ddd1498f97129f5f425a77cc88879205357d.tar.gz nextcloud-server-b1a2ddd1498f97129f5f425a77cc88879205357d.zip |
Merge pull request #3799 from owncloud/fix_pdo_statement_wrapper_numrows_on_modification
Fix pdo statement wrapper numrows on modification
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/db.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib/db.php b/tests/lib/db.php index afbdb413c3d..0ba7d5d4b06 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -40,7 +40,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { $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); + $this->assertEquals('1', $result); $query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?'); $result = $query->execute(array('uri_1')); $this->assertTrue((bool)$result); @@ -57,7 +57,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { public function testNOW() { $query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (NOW(),?)'); $result = $query->execute(array('uri_2')); - $this->assertTrue((bool)$result); + $this->assertEquals('1', $result); $query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?'); $result = $query->execute(array('uri_2')); $this->assertTrue((bool)$result); @@ -66,7 +66,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { public function testUNIX_TIMESTAMP() { $query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`,`uri`) VALUES (UNIX_TIMESTAMP(),?)'); $result = $query->execute(array('uri_3')); - $this->assertTrue((bool)$result); + $this->assertEquals('1', $result); $query = OC_DB::prepare('SELECT `fullname`,`uri` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?'); $result = $query->execute(array('uri_3')); $this->assertTrue((bool)$result); @@ -105,7 +105,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { // Normal test to have same known data inserted. $query = OC_DB::prepare('INSERT INTO `*PREFIX*'.$this->table2.'` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)'); $result = $query->execute(array($fullname, $uri, $carddata)); - $this->assertTrue((bool)$result); + $this->assertEquals('1', $result); $query = OC_DB::prepare('SELECT `fullname`, `uri`, `carddata` FROM `*PREFIX*'.$this->table2.'` WHERE `uri` = ?'); $result = $query->execute(array($uri)); $this->assertTrue((bool)$result); |