SlackbotHandlerTest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @author Haralan Dobrev <hkdobrev@gmail.com>
  15. * @see https://slack.com/apps/A0F81R8ET-slackbot
  16. * @coversDefaultClass Monolog\Handler\SlackbotHandler
  17. */
  18. class SlackbotHandlerTest extends TestCase
  19. {
  20. /**
  21. * @covers ::__construct
  22. */
  23. public function testConstructorMinimal()
  24. {
  25. $handler = new SlackbotHandler('test-team', 'test-token', 'test-channel');
  26. $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler);
  27. }
  28. /**
  29. * @covers ::__construct
  30. */
  31. public function testConstructorFull()
  32. {
  33. $handler = new SlackbotHandler(
  34. 'test-team',
  35. 'test-token',
  36. 'test-channel',
  37. Logger::DEBUG,
  38. false
  39. );
  40. $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler);
  41. }
  42. }