1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-08 14:16:42 +02:00

Minor fixes

This commit is contained in:
Jordi Boggiano
2011-04-06 13:56:01 +02:00
parent a390331a5d
commit 7fd13f6aec
3 changed files with 5 additions and 2 deletions

View File

@@ -65,6 +65,6 @@ class BufferHandler extends AbstractHandler
*/ */
protected function write(array $record) protected function write(array $record)
{ {
throw new \BadMethodCallException('This method should not be called directly on the FingersCrossedHandler.'); throw new \BadMethodCallException('This method should not be called directly on the BufferHandler.');
} }
} }

View File

@@ -35,7 +35,7 @@ class BufferHandlerTest extends TestCase
$handler = new BufferHandler($test); $handler = new BufferHandler($test);
$handler->handle($this->getRecord(Logger::WARNING)); $handler->handle($this->getRecord(Logger::WARNING));
$handler->handle($this->getRecord(Logger::DEBUG)); $handler->handle($this->getRecord(Logger::DEBUG));
unset ($handler); unset($handler);
$this->assertTrue($test->hasWarningRecords()); $this->assertTrue($test->hasWarningRecords());
$this->assertTrue($test->hasDebugRecords()); $this->assertTrue($test->hasDebugRecords());
} }

View File

@@ -13,6 +13,9 @@ namespace Monolog;
class TestCase extends \PHPUnit_Framework_TestCase class TestCase extends \PHPUnit_Framework_TestCase
{ {
/**
* @return array Record
*/
protected function getRecord($level = Logger::WARNING, $message = 'test') protected function getRecord($level = Logger::WARNING, $message = 'test')
{ {
return array( return array(