We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f3d280 commit 9b0a166Copy full SHA for 9b0a166
tests/Log/LogLoggerTest.php
@@ -36,6 +36,17 @@ public function testContextIsAddedToAllSubsequentLogs()
36
$writer->error('foo');
37
}
38
39
+ public function testContextIsFlushed()
40
+ {
41
+ $writer = new Logger($monolog = m::mock(Monolog::class));
42
+ $writer->withContext(['bar' => 'baz']);
43
+ $writer->withoutContext();
44
+
45
+ $monolog->expects('error')->with('foo', []);
46
47
+ $writer->error('foo');
48
+ }
49
50
public function testLoggerFiresEventsDispatcher()
51
{
52
$writer = new Logger($monolog = m::mock(Monolog::class), $events = new Dispatcher);
0 commit comments