Merge "Changed quoting function for oracleDB."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Sep 2013 19:10:52 +0000 (19:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Sep 2013 19:10:52 +0000 (19:10 +0000)
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() {