Changed quoting function for oracleDB.
authorfreakolowsky <freak@drajv.si>
Sun, 26 May 2013 14:26:41 +0000 (16:26 +0200)
committerfreakolowsky <freak@drajv.si>
Sun, 26 May 2013 14:35:48 +0000 (16:35 +0200)
Change-Id: Ifba624f62702740b6531d0dab082015cd2a235b4

tests/phpunit/includes/db/DatabaseTest.php

index c9f5f5c..a3ef55a 100644 (file)
@@ -84,19 +84,29 @@ class DatabaseTest extends MediaWikiTestCase {
                        $quote = '';
                } elseif ( $this->db->getType() === 'mysql' ) {
                        $quote = '`';
+               } elseif ( $this->db->getType() === 'oracle' ) {
+                       $quote = '/*Q*/';
                } else {
                        $quote = '"';
                }
 
                if ( $database !== null ) {
-                       $database = $quote . $database . $quote . '.';
+                       if ( $this->db->getType() === 'oracle' ) {
+                               $database = $quote . $database . '.';
+                       } else {
+                               $database = $quote . $database . $quote . '.';
+                       }
                }
 
                if ( $prefix === null ) {
                        $prefix = $this->dbPrefix();
                }
 
-               return $database . $quote . $prefix . $table . $quote;
+               if ( $this->db->getType() === 'oracle' ) {
+                       return strtoupper($database . $quote . $prefix . $table);
+               } else {
+                       return $database . $quote . $prefix . $table . $quote;
+               }
        }
 
        function testTableNameLocal() {