mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-11 23:54:04 +02:00
Made the write method protected
Tests are not a good reason to make it public.
This commit is contained in:
40
tests/Monolog/TestCase.php
Normal file
40
tests/Monolog/TestCase.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user