mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-13 08:34:12 +02:00
Add a message to assertions to know which ones fail
This commit is contained in:
@@ -26,16 +26,16 @@ class TestHandlerTest extends TestCase
|
|||||||
{
|
{
|
||||||
$handler = new TestHandler;
|
$handler = new TestHandler;
|
||||||
$record = $this->getRecord($level, 'test'.$method);
|
$record = $this->getRecord($level, 'test'.$method);
|
||||||
$this->assertFalse($handler->{'has'.$method}($record));
|
$this->assertFalse($handler->{'has'.$method}($record), 'has'.$method);
|
||||||
$this->assertFalse($handler->{'has'.$method.'ThatContains'}('test'));
|
$this->assertFalse($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains');
|
||||||
$this->assertFalse($handler->{'has'.$method.'Records'}());
|
$this->assertFalse($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records');
|
||||||
$handler->handle($record);
|
$handler->handle($record);
|
||||||
|
|
||||||
$this->assertFalse($handler->{'has'.$method}('bar'));
|
$this->assertFalse($handler->{'has'.$method}('bar'), 'has'.$method);
|
||||||
$this->assertTrue($handler->{'has'.$method}($record));
|
$this->assertTrue($handler->{'has'.$method}($record), 'has'.$method);
|
||||||
$this->assertTrue($handler->{'has'.$method}('test'.$method));
|
$this->assertTrue($handler->{'has'.$method}('test'.$method), 'has'.$method);
|
||||||
$this->assertTrue($handler->{'has'.$method.'ThatContains'}('test'));
|
$this->assertTrue($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains');
|
||||||
$this->assertTrue($handler->{'has'.$method.'Records'}());
|
$this->assertTrue($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records');
|
||||||
|
|
||||||
$records = $handler->getRecords();
|
$records = $handler->getRecords();
|
||||||
unset($records[0]['formatted']);
|
unset($records[0]['formatted']);
|
||||||
|
Reference in New Issue
Block a user