mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-23 06:22:47 +01:00
41 lines
1021 B
PHP
41 lines
1021 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Symfony package.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Monolog;
|
|
|
|
class TestCase extends \PHPUnit_Framework_TestCase
|
|
{
|
|
protected function getRecord($level = Logger::WARNING, $message = 'test')
|
|
{
|
|
return array(
|
|
'message' => $message,
|
|
'level' => $level,
|
|
'level_name' => Logger::getLevelName($level),
|
|
'channel' => 'test',
|
|
'datetime' => new \DateTime(),
|
|
'extra' => array(),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @return Monolog\Formatter\FormatterInterface
|
|
*/
|
|
protected function getIdentityFormatter()
|
|
{
|
|
$formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface');
|
|
$formatter->expects($this->any())
|
|
->method('format')
|
|
->will($this->returnArgument(0));
|
|
|
|
return $formatter;
|
|
}
|
|
}
|