1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-23 06:22:47 +01:00
php-monolog/tests/Monolog/TestCase.php
Christophe Coevoet 3cb3dbdc8f Made the write method protected
Tests are not a good reason to make it public.
2011-04-06 13:22:06 +02:00

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;
}
}