1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 23:24:02 +02:00

Add TestHandler::hasRecordThatMatches($regex, $level)

This commit is contained in:
Austin Hyde
2015-06-20 19:41:17 -04:00
parent 3e8f0ecb36
commit f2fea2c3f5
2 changed files with 18 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ class TestHandlerTest extends TestCase
$this->assertFalse($handler->{'has'.$method.'ThatPasses'}(function($rec){
return true;
}), 'has'.$method.'ThatPasses');
$this->assertFalse($handler->{'has'.$method.'ThatMatches'}('/test\w+/'));
$this->assertFalse($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records');
$handler->handle($record);
@@ -41,6 +42,7 @@ class TestHandlerTest extends TestCase
$this->assertTrue($handler->{'has'.$method.'ThatPasses'}(function($rec){
return true;
}), 'has'.$method.'ThatPasses');
$this->assertTrue($handler->{'has'.$method.'ThatMatches'}('/test\w+/'));
$this->assertTrue($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records');
$records = $handler->getRecords();