1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-22 22:12:41 +01:00
php-monolog/tests/Monolog/TestCase.php

41 lines
1019 B
PHP
Raw Normal View History

<?php
/*
2011-04-06 13:56:47 +02:00
* This file is part of the Monolog package.
*
2011-04-06 13:56:47 +02:00
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* 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;
}
}