mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-21 04:11:47 +02:00
@@ -72,6 +72,18 @@ class RavenHandlerTest extends TestCase
|
||||
$this->assertEquals($ravenClient::WARNING, $ravenClient->lastData['level']);
|
||||
$this->assertContains($record['message'], $ravenClient->lastData['message']);
|
||||
}
|
||||
|
||||
public function testTag()
|
||||
{
|
||||
$ravenClient = $this->getRavenClient();
|
||||
$handler = $this->getHandler($ravenClient);
|
||||
|
||||
$tags = array(1, 2, 'foo');
|
||||
$record = $this->getRecord(Logger::INFO, "test", array('tags' => $tags));
|
||||
$handler->handle($record);
|
||||
|
||||
$this->assertEquals($tags, $ravenClient->lastData['tags']);
|
||||
}
|
||||
|
||||
public function testException()
|
||||
{
|
||||
|
29
tests/Monolog/Processor/TagProcessorTest.php
Normal file
29
tests/Monolog/Processor/TagProcessorTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Monolog\Processor;
|
||||
|
||||
use Monolog\TestCase;
|
||||
|
||||
class TagProcessorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Monolog\Processor\TagProcessor::__invoke
|
||||
*/
|
||||
public function testProcessor()
|
||||
{
|
||||
$tags = array(1, 2, 3);
|
||||
$processor = new TagProcessor($tags);
|
||||
$record = $processor($this->getRecord());
|
||||
|
||||
$this->assertEquals($tags, $record['extra']['tags']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user