mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-09 14:46:46 +02:00
Fix tests
This commit is contained in:
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
namespace Monolog\Handler;
|
namespace Monolog\Handler;
|
||||||
|
|
||||||
|
use Monolog\Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to record a log on a NewRelic application
|
* Class to record a log on a NewRelic application
|
||||||
*
|
*
|
||||||
|
@@ -15,26 +15,26 @@ use Monolog\TestCase;
|
|||||||
use Monolog\Logger;
|
use Monolog\Logger;
|
||||||
|
|
||||||
class NewRelicHandlerTest extends TestCase
|
class NewRelicHandlerTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @expectedException Monolog\Handler\MissingExtensionException
|
* @expectedException Monolog\Handler\MissingExtensionException
|
||||||
*/
|
*/
|
||||||
public function testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded()
|
public function testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded()
|
||||||
{
|
{
|
||||||
$handler = new StubNewRelicHandlerWithoutExtension();
|
$handler = new StubNewRelicHandlerWithoutExtension();
|
||||||
$handler->handle($this->getRecord());
|
$handler->handle($this->getRecord(Logger::ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testThehandlerCanHandleTheRecord()
|
public function testThehandlerCanHandleTheRecord()
|
||||||
{
|
{
|
||||||
$handler = new StubNewRelicHandler();
|
$handler = new StubNewRelicHandler();
|
||||||
$handler->handle($this->getRecord());
|
$handler->handle($this->getRecord(Logger::ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testThehandlerCanAddParamsToTheNewRelicTrace()
|
public function testThehandlerCanAddParamsToTheNewRelicTrace()
|
||||||
{
|
{
|
||||||
$handler = new StubNewRelicHandler();
|
$handler = new StubNewRelicHandler();
|
||||||
$handler->handle($this->getRecord(100, 'log message', array('a' => 'b')));
|
$handler->handle($this->getRecord(Logger::ERROR, 'log message', array('a' => 'b')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user