28 $record = $this->
getRecord($level,
'test'.$method);
29 $this->assertFalse(
$handler->hasRecords($level));
30 $this->assertFalse(
$handler->hasRecord($record, $level));
31 $this->assertFalse(
$handler->{
'has'.$method}($record),
'has'.$method);
32 $this->assertFalse(
$handler->{
'has'.$method.
'ThatContains'}(
'test'),
'has'.$method.
'ThatContains');
33 $this->assertFalse(
$handler->{
'has'.$method.
'ThatPasses'}(
function ($rec) {
35 }),
'has'.$method.
'ThatPasses');
36 $this->assertFalse(
$handler->{
'has'.$method.
'ThatMatches'}(
'/test\w+/'));
37 $this->assertFalse(
$handler->{
'has'.$method.
'Records'}(),
'has'.$method.
'Records');
40 $this->assertFalse(
$handler->{
'has'.$method}(
'bar'),
'has'.$method);
41 $this->assertTrue(
$handler->hasRecords($level));
42 $this->assertTrue(
$handler->hasRecord($record, $level));
43 $this->assertTrue(
$handler->{
'has'.$method}($record),
'has'.$method);
44 $this->assertTrue(
$handler->{
'has'.$method}(
'test'.$method),
'has'.$method);
45 $this->assertTrue(
$handler->{
'has'.$method.
'ThatContains'}(
'test'),
'has'.$method.
'ThatContains');
46 $this->assertTrue(
$handler->{
'has'.$method.
'ThatPasses'}(
function ($rec) {
48 }),
'has'.$method.
'ThatPasses');
49 $this->assertTrue(
$handler->{
'has'.$method.
'ThatMatches'}(
'/test\w+/'));
50 $this->assertTrue(
$handler->{
'has'.$method.
'Records'}(),
'has'.$method.
'Records');
54 $this->assertEquals(array($record),
$records);
59 $record = $this->getRecord(Logger::WARNING,
'test', array());
60 $this->assertFalse(
$handler->hasWarning(array(
67 $this->assertTrue(
$handler->hasWarning(array(
71 $this->assertFalse(
$handler->hasWarning(array(
81 $record = $this->getRecord(Logger::WARNING,
'test', array(
'foo' =>
'bar'));
82 $this->assertFalse(
$handler->hasWarning(array(
91 $this->assertTrue(
$handler->hasWarning(array(
97 $this->assertFalse(
$handler->hasWarning(array(
106 array(
'Emergency', Logger::EMERGENCY),
107 array(
'Alert' , Logger::ALERT),
108 array(
'Critical' , Logger::CRITICAL),
109 array(
'Error' , Logger::ERROR),
110 array(
'Warning' , Logger::WARNING),
111 array(
'Info' , Logger::INFO),
112 array(
'Notice' , Logger::NOTICE),
testHandler($method, $level)
methodProvider
testHandlerAssertEmptyContext()
getRecord($level=Logger::WARNING, $message='test', $context=array())
testHandlerAssertNonEmptyContext()
Used for testing purposes.