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 MonologSpi::mergeConfig
31 public function testMergeConfig() {
35 'processors' => array( 'constructor' ),
36 'handlers' => array( 'constructor' ),
39 'processors' => array(
40 'constructor' => array(
41 'class' => 'constructor',
45 'constructor' => array(
46 'class' => 'constructor',
47 'formatter' => 'constructor',
50 'formatters' => array(
51 'constructor' => array(
52 'class' => 'constructor',
57 $fixture = new MonologSpi( $base );
60 TestingAccessWrapper
::newFromObject( $fixture )->config
63 $fixture->mergeConfig( array(
66 'processors' => array( 'merged' ),
67 'handlers' => array( 'merged' ),
70 'processors' => array(
76 'idkfa' => array( 'xyzzy' ),
81 'formatter' => 'merged',
84 'formatters' => array(
94 'processors' => array( 'constructor' ),
95 'handlers' => array( 'constructor' ),
98 'processors' => array( 'merged' ),
99 'handlers' => array( 'merged' ),
102 'processors' => array(
103 'constructor' => array(
104 'class' => 'constructor',
111 'constructor' => array(
112 'class' => 'constructor',
113 'formatter' => 'constructor',
117 'formatter' => 'merged',
120 'formatters' => array(
121 'constructor' => array(
122 'class' => 'constructor',
129 'idkfa' => array( 'xyzzy' ),
132 TestingAccessWrapper
::newFromObject( $fixture )->config