From 489330f4aaad712b93544362e69804f74b268935 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 21 Sep 2016 14:06:12 -0700 Subject: [PATCH] Set more FakeDatabaseMysqlBase fields in __construct() Change-Id: I37a1e4aae186e19637817bd10be0d8fad06187d4 --- tests/phpunit/includes/db/DatabaseMysqlBaseTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php index b2cdc8641e..9480c2df2d 100644 --- a/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php +++ b/tests/phpunit/includes/db/DatabaseMysqlBaseTest.php @@ -33,6 +33,12 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase { function __construct() { $this->profiler = new ProfilerStub( [] ); $this->trxProfiler = new TransactionProfiler(); + $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(); } -- 2.20.1