ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
12 namespace 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 }
catch(Exception $e) $message
Create styles array
The data for the language used.
Processes a record&#39;s message according to PSR-3 rules.