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

Add strpos based TestHandler methods

This commit is contained in:
Richard Tuin
2015-03-18 07:34:38 +01:00
parent c31a2c4e8d
commit b63e013827
2 changed files with 57 additions and 0 deletions

View File

@@ -27,12 +27,14 @@ class TestHandlerTest extends TestCase
$handler = new TestHandler;
$record = $this->getRecord($level, 'test'.$method);
$this->assertFalse($handler->{'has'.$method}($record));
$this->assertFalse($handler->{'has'.$method.'ThatContains'}('test'));
$this->assertFalse($handler->{'has'.$method.'Records'}());
$handler->handle($record);
$this->assertFalse($handler->{'has'.$method}('bar'));
$this->assertTrue($handler->{'has'.$method}($record));
$this->assertTrue($handler->{'has'.$method}('test'.$method));
$this->assertTrue($handler->{'has'.$method.'ThatContains'}('test'));
$this->assertTrue($handler->{'has'.$method.'Records'}());
$records = $handler->getRecords();