From: Aaron Schulz Date: Wed, 21 Sep 2016 21:06:12 +0000 (-0700) Subject: Set more FakeDatabaseMysqlBase fields in __construct() X-Git-Tag: 1.31.0-rc.0~5408^2 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=489330f4aaad712b93544362e69804f74b268935;p=lhc%2Fweb%2Fwiklou.git Set more FakeDatabaseMysqlBase fields in __construct() Change-Id: I37a1e4aae186e19637817bd10be0d8fad06187d4 --- 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(); }