From 26d96f10221adc76e68f3e7d91f6fd216275beb6 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 23 Mar 2014 18:53:19 +0100 Subject: [PATCH] Wrap up flowdock handler, refs #337 --- README.mdown | 1 + src/Monolog/Handler/FlowdockHandler.php | 2 ++ tests/Monolog/Handler/FlowdockHandlerTest.php | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/README.mdown b/README.mdown index ba5a9731..ca23bf7f 100644 --- a/README.mdown +++ b/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 diff --git a/src/Monolog/Handler/FlowdockHandler.php b/src/Monolog/Handler/FlowdockHandler.php index 2a52a9ff..a5428dc8 100644 --- a/src/Monolog/Handler/FlowdockHandler.php +++ b/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 * diff --git a/tests/Monolog/Handler/FlowdockHandlerTest.php b/tests/Monolog/Handler/FlowdockHandlerTest.php index 958de541..4b120d51 100644 --- a/tests/Monolog/Handler/FlowdockHandlerTest.php +++ b/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();