Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312071

Change subject: Set more fields in fake DB subclasses to avoid errors
......................................................................

Set more fields in fake DB subclasses to avoid errors

Change-Id: I6b24422e830a8f82ba24383b3425808cb2a28b15
---
M tests/phpunit/includes/db/DatabaseTestHelper.php
M tests/phpunit/includes/installer/DatabaseUpdaterTest.php
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/312071/1

diff --git a/tests/phpunit/includes/db/DatabaseTestHelper.php 
b/tests/phpunit/includes/db/DatabaseTestHelper.php
index 29b2bed..4c3ba10 100644
--- a/tests/phpunit/includes/db/DatabaseTestHelper.php
+++ b/tests/phpunit/includes/db/DatabaseTestHelper.php
@@ -36,6 +36,9 @@
                $this->cliMode = isset( $opts['cliMode'] ) ? $opts['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();
        }
 
diff --git a/tests/phpunit/includes/installer/DatabaseUpdaterTest.php 
b/tests/phpunit/includes/installer/DatabaseUpdaterTest.php
index 4634239..f01c47d 100644
--- a/tests/phpunit/includes/installer/DatabaseUpdaterTest.php
+++ b/tests/phpunit/includes/installer/DatabaseUpdaterTest.php
@@ -21,6 +21,12 @@
        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();
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/312071
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b24422e830a8f82ba24383b3425808cb2a28b15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to