Improve some parameter docs
[lhc/web/wiklou.git] / tests / phpunit / includes / db / DatabaseTestHelper.php
index d689d50..d19d998 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use Wikimedia\Rdbms\TransactionProfiler;
+use Wikimedia\Rdbms\DatabaseDomain;
 
 /**
  * Helper for testing the methods from the Database class
@@ -30,6 +31,11 @@ class DatabaseTestHelper extends Database {
         */
        protected $tablesExists;
 
+       /**
+        * Value to return from unionSupportsOrderAndLimit()
+        */
+       protected $unionSupportsOrderAndLimit = true;
+
        public function __construct( $testName, array $opts = [] ) {
                $this->testName = $testName;
 
@@ -47,6 +53,7 @@ class DatabaseTestHelper extends Database {
        /**
         * Returns SQL queries grouped by '; '
         * Clear the list of queries that have been done so far.
+        * @return string
         */
        public function getLastSqls() {
                $lastSqls = implode( '; ', $this->lastSqls );
@@ -202,4 +209,12 @@ class DatabaseTestHelper extends Database {
 
                return new FakeResultWrapper( $res );
        }
+
+       public function unionSupportsOrderAndLimit() {
+               return $this->unionSupportsOrderAndLimit;
+       }
+
+       public function setUnionSupportsOrderAndLimit( $v ) {
+               $this->unionSupportsOrderAndLimit = (bool)$v;
+       }
 }