AmqpHandlerTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /**
  14. * @covers Monolog\Handler\RotatingFileHandler
  15. */
  16. class AmqpHandlerTest extends TestCase
  17. {
  18. public function setUp()
  19. {
  20. if (!class_exists('AMQPConnection') || !class_exists('AMQPExchange')) {
  21. $this->markTestSkipped("amqp-php not installed");
  22. }
  23. if (!class_exists('AMQPChannel')) {
  24. throw new \Exception(' Please update AMQP to version >= 1');
  25. }
  26. require_once __DIR__ . '/AmqpMocks.php';
  27. }
  28. public function testConstruct()
  29. {
  30. // $handler = new AmqpHandler($this->getMockAMQPConnection(), 'log', 'monolog');
  31. // $this->assertInstanceOf('Monolog\Handler\AmqpHandler', $handler);
  32. }
  33. public function testWrite()
  34. {
  35. }
  36. public function getMockAMQPConnection()
  37. {
  38. return new MockAMQPConnection();
  39. }
  40. public function tearDown()
  41. {
  42. foreach (glob(__DIR__.'/Fixtures/*.rot') as $file) {
  43. unlink($file);
  44. }
  45. }
  46. }