GelfHandlerTest.php 928 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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\Logger;
  12. use Gelf\MessagePublisher;
  13. class GelfHandlerTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function setUp()
  16. {
  17. if (!class_exists("MessagePublisher"))
  18. {
  19. $this->markTestSkipped("https://github.com/mlehner/gelf-php not installed");
  20. }
  21. }
  22. /**
  23. * @covers Monolog\Handler\GelfHandler::__construct
  24. */
  25. public function testConstruct()
  26. {
  27. $handler = new GelfHandler($this->getMessagePublisher());
  28. $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler);
  29. }
  30. protected function getMessagePublisher()
  31. {
  32. return new MessagePublisher();
  33. }
  34. }