NewRelicHandlerTest.php 791 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Handler;
  11. use Monolog\TestCase;
  12. use Monolog\Logger;
  13. class NewRelicHandlerTest extends TestCase
  14. {
  15. public function testFallbackHandler()
  16. {
  17. $handler = new NewRelicHandler();
  18. $fallbackHandler = new TestHandler();
  19. $handler->setFallbackHandler($fallbackHandler);
  20. $record = array(
  21. 'level' => Logger::DEBUG,
  22. 'extra' => array(),
  23. );
  24. $handler->handle($record);
  25. $this->assertCount(1, $fallbackHandler->getRecords());
  26. }
  27. }