3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
21 namespace MediaWiki\Logger
;
23 use MediaWikiTestCase
;
24 use TestingAccessWrapper
;
26 class MonologSpiTest
extends MediaWikiTestCase
{
29 * @covers MediaWiki\Logger\MonologSpi::mergeConfig
31 public function testMergeConfig() {
35 'processors' => [ 'constructor' ],
36 'handlers' => [ 'constructor' ],
41 'class' => 'constructor',
46 'class' => 'constructor',
47 'formatter' => 'constructor',
52 'class' => 'constructor',
57 $fixture = new MonologSpi( $base );
60 TestingAccessWrapper
::newFromObject( $fixture )->config
63 $fixture->mergeConfig( [
66 'processors' => [ 'merged' ],
67 'handlers' => [ 'merged' ],
76 'idkfa' => [ 'xyzzy' ],
81 'formatter' => 'merged',
94 'processors' => [ 'constructor' ],
95 'handlers' => [ 'constructor' ],
98 'processors' => [ 'merged' ],
99 'handlers' => [ 'merged' ],
104 'class' => 'constructor',
112 'class' => 'constructor',
113 'formatter' => 'constructor',
117 'formatter' => 'merged',
122 'class' => 'constructor',
129 'idkfa' => [ 'xyzzy' ],
132 TestingAccessWrapper
::newFromObject( $fixture )->config