ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
PsrLogMessageProcessorTest.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Monolog\Processor;
13
15{
19 public function testReplacement($val, $expected)
20 {
21 $proc = new PsrLogMessageProcessor;
22
23 $message = $proc(array(
24 'message' => '{foo}',
25 'context' => array('foo' => $val)
26 ));
27 $this->assertEquals($expected, $message['message']);
28 }
29
30 public function getPairs()
31 {
32 return array(
33 array('foo', 'foo'),
34 array('3', '3'),
35 array(3, '3'),
36 array(null, ''),
37 array(true, '1'),
38 array(false, ''),
39 array(new \stdClass, '[object stdClass]'),
40 array(array(), '[array]'),
41 );
42 }
43}
testReplacement($val, $expected)
@dataProvider getPairs
Processes a record's message according to PSR-3 rules.