mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-16 01:54:19 +02:00
Fix bug with level in GitProcessor (#1749)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Monolog\Processor;
|
||||
|
||||
use Monolog\Level;
|
||||
use Monolog\Test\TestCase;
|
||||
|
||||
class GitProcessorTest extends TestCase
|
||||
@@ -26,4 +27,15 @@ class GitProcessorTest extends TestCase
|
||||
$this->assertArrayHasKey('git', $record->extra);
|
||||
$this->assertTrue(!is_array($record->extra['git']['branch']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Processor\GitProcessor::__invoke
|
||||
*/
|
||||
public function testProcessorWithLevel()
|
||||
{
|
||||
$processor = new GitProcessor(Level::Error);
|
||||
$record = $processor($this->getRecord());
|
||||
|
||||
$this->assertArrayNotHasKey('git', $record->extra);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user