summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-06-14 12:12:32 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-06-14 12:12:32 +0200
commitfc309caf163ae390e81a4473ed35d98b17a79d0a (patch)
tree1905d69d665e48980f6102d8ff7f851996af2377 /tests
parente5d3cd59acf5e9d9c7480797f30668103c00d1cb (diff)
downloadnextcloud-server-fc309caf163ae390e81a4473ed35d98b17a79d0a.tar.gz
nextcloud-server-fc309caf163ae390e81a4473ed35d98b17a79d0a.zip
fix oci dbschema test
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/dbschema.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php
index 6631c929cf2..59f203993ef 100644
--- a/tests/lib/dbschema.php
+++ b/tests/lib/dbschema.php
@@ -94,13 +94,18 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
break;
case 'pgsql':
$sql = "SELECT tablename AS table_name, schemaname AS schema_name "
- . "FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' "
+ . "FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' "
. "AND schemaname != 'information_schema' "
. "AND tablename = '".$table."'";
$query = OC_DB::prepare($sql);
$result = $query->execute(array());
$exists = $result && $result->fetchOne();
break;
+ case 'oci':
+ $sql = 'SELECT table_name FROM user_tables WHERE table_name = ?';
+ $result = \OC_DB::executeAudited($sql, array($table));
+ $exists = (bool)$result->fetchOne(); //oracle uses MDB2 and returns null
+ break;
case 'mssql':
$sql = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{$table}'";
$query = OC_DB::prepare($sql);