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