1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Pull in mlehner/gelf-php via Composer

This commit is contained in:
Marc Abramowitz
2012-04-06 07:25:02 -07:00
parent c9e61750d0
commit 14ac76a0ae
5 changed files with 35 additions and 4 deletions

View File

@@ -11,14 +11,15 @@
namespace Monolog\Handler;
use Monolog\TestCase;
use Monolog\Logger;
use Gelf\MessagePublisher;
class GelfHandlerTest extends \PHPUnit_Framework_TestCase
class GelfHandlerTest extends TestCase
{
public function setUp()
{
if (!class_exists("MessagePublisher"))
if (!class_exists("Gelf\MessagePublisher"))
{
$this->markTestSkipped("https://github.com/mlehner/gelf-php not installed");
}
@@ -35,6 +36,14 @@ class GelfHandlerTest extends \PHPUnit_Framework_TestCase
protected function getMessagePublisher()
{
return new MessagePublisher();
return new MessagePublisher('localhost');
}
public function testStuff()
{
$handler = new GelfHandler($this->getMessagePublisher());
$handler->setFormatter($this->getIdentityFormatter());
$handler->handle($this->getRecord(Logger::DEBUG));
$handler->handle($this->getRecord(Logger::WARNING));
}
}