diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 22:12:31 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 22:37:49 +0100 |
commit | 89be55a672afe0e09a33d4997ec10c0e833d4885 (patch) | |
tree | 2789f398177333df179ab73fc5ad9926edce39ec /tests | |
parent | b966a4eb17729230c461b9075143203bd50ed9e3 (diff) | |
download | nextcloud-server-89be55a672afe0e09a33d4997ec10c0e833d4885.tar.gz nextcloud-server-89be55a672afe0e09a33d4997ec10c0e833d4885.zip |
let insertIfNotExist() throw the native DBALException - no need to hide the real exception
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/db.php | 10 |
1 files changed, 5 insertions, 5 deletions
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'), |