jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I6b24422e830a8f82ba24383b3425808cb2a28b15
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to