From 89be55a672afe0e09a33d4997ec10c0e833d4885 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 9 Mar 2015 22:12:31 +0100 Subject: let insertIfNotExist() throw the native DBALException - no need to hide the real exception --- tests/lib/db.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/lib/db.php b/tests/lib/db.php index 73eef3a4d0e..056ce535436 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -125,7 +125,7 @@ class Test_DB extends \Test\TestCase { ); foreach($categoryEntries as $entry) { - $result = OC_DB::insertIfNotExist('*PREFIX*'.$this->table3, + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table3, array( 'uid' => $entry['user'], 'type' => $entry['type'], @@ -148,7 +148,7 @@ class Test_DB extends \Test\TestCase { ); foreach($categoryEntries as $entry) { - $result = OC_DB::insertIfNotExist('*PREFIX*'.$this->table2, + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table2, array( 'addressbookid' => $entry['addressbookid'], 'fullname' => $entry['fullname'], @@ -180,7 +180,7 @@ class Test_DB extends \Test\TestCase { $this->assertEquals($carddata, $rowset[0]['carddata']); // Try to insert a new row - $result = OC_DB::insertIfNotExist('*PREFIX*'.$this->table2, + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table2, array( 'fullname' => $fullName, 'uri' => $uri, @@ -199,7 +199,7 @@ class Test_DB extends \Test\TestCase { } public function testInsertIfNotExistsViolating() { - $result = OC_DB::insertIfNotExist('*PREFIX*'.$this->table5, + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table5, array( 'storage' => 1, 'path_hash' => md5('welcome.txt'), @@ -207,7 +207,7 @@ class Test_DB extends \Test\TestCase { )); $this->assertEquals(1, $result); - $result = OC_DB::insertIfNotExist('*PREFIX*'.$this->table5, + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table5, array( 'storage' => 1, 'path_hash' => md5('welcome.txt'), -- cgit v1.2.3