Bladeren bron

Wrap up flowdock handler, refs #337

Jordi Boggiano 11 jaren geleden
bovenliggende
commit
26d96f1022
3 gewijzigde bestanden met toevoegingen van 10 en 0 verwijderingen
  1. 1 0
      README.mdown
  2. 2 0
      src/Monolog/Handler/FlowdockHandler.php
  3. 7 0
      tests/Monolog/Handler/FlowdockHandlerTest.php

+ 1 - 0
README.mdown

@@ -119,6 +119,7 @@ Handlers
 - _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance.
 - _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API.
 - _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API.
+- _FlowdockHandler_: Logs records to a [Flowdock](https://www.flowdock.com/) account.
 
 ### Log specific servers and networked logging
 

+ 2 - 0
src/Monolog/Handler/FlowdockHandler.php

@@ -16,6 +16,8 @@ use Monolog\Logger;
 /**
  * Sends notifications through the Flowdock push API
  *
+ * This must be configured with a FlowdockFormatter instance via setFormatter()
+ *
  * Notes:
  * API token - Flowdock API token
  *

+ 7 - 0
tests/Monolog/Handler/FlowdockHandlerTest.php

@@ -31,6 +31,13 @@ class FlowdockHandlerTest extends TestCase
      */
     private $handler;
 
+    public function setUp()
+    {
+        if (!extension_loaded('openssl')) {
+            $this->markTestSkipped('This test requires openssl to run');
+        }
+    }
+
     public function testWriteHeader()
     {
         $this->createHandler();