Merge "Ensure users are able to edit the page after changing the content model"
[lhc/web/wiklou.git] / tests / phpunit / includes / installer / DatabaseUpdaterTest.php
index 5e5e921..f01c47d 100644 (file)
@@ -21,12 +21,19 @@ class FakeDatabase extends DatabaseBase {
        public $lastInsertData;
 
        function __construct() {
+               $this->cliMode = true;
+               $this->connLogger = new \Psr\Log\NullLogger();
+               $this->queryLogger = new \Psr\Log\NullLogger();
+               $this->errorLogger = function ( Exception $e ) {
+                       wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
+               };
+               $this->currentDomain = DatabaseDomain::newUnspecified();
        }
 
-       function clearFlag( $arg ) {
+       function clearFlag( $arg, $remember = self::REMEMBER_NOTHING ) {
        }
 
-       function setFlag( $arg ) {
+       function setFlag( $arg, $remember = self::REMEMBER_NOTHING ) {
        }
 
        public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
@@ -124,7 +131,7 @@ class FakeDatabase extends DatabaseBase {
         *
         * Example:
         * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
-        * $dbw->insert( 'page', array( 'page_id' => $id ) );
+        * $dbw->insert( 'page', [ 'page_id' => $id ] );
         * $id = $dbw->insertId();
         *
         * @return int