1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-24 01:56:18 +02:00
Files
php-monolog/tests/Monolog/Handler/NewRelicHandlerTest.php
Alessandro Nadalin b439707cbb Added an handler for NewRelic:
* implemented a test which verifies that the fallback handler handles records when the NewRelic PHP extension is not installes
* implemented the actual handler
2013-07-24 09:46:20 +04:00

34 lines
791 B
PHP

<?php
/*
* This file is part of the Monolog package.
*
* (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\Handler;
use Monolog\TestCase;
use Monolog\Logger;
class NewRelicHandlerTest extends TestCase
{
public function testFallbackHandler()
{
$handler = new NewRelicHandler();
$fallbackHandler = new TestHandler();
$handler->setFallbackHandler($fallbackHandler);
$record = array(
'level' => Logger::DEBUG,
'extra' => array(),
);
$handler->handle($record);
$this->assertCount(1, $fallbackHandler->getRecords());
}
}