You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Tests/LoggerTest.php
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,20 @@ public function testClear()
108
108
$this->assertSame(0, $logger->countErrors());
109
109
}
110
110
111
+
publicfunctiontestReset()
112
+
{
113
+
$handler = newTestHandler();
114
+
$logger = newLogger('test', [$handler]);
115
+
$logger->pushProcessor(newDebugProcessor());
116
+
117
+
$logger->info('test');
118
+
$logger->reset();
119
+
120
+
$this->assertEmpty($logger->getLogs());
121
+
$this->assertSame(0, $logger->countErrors());
122
+
$this->assertEmpty($handler->getRecords());
123
+
}
124
+
111
125
/**
112
126
* @group legacy
113
127
* @expectedDeprecation The "Symfony\Bridge\Monolog\Logger::getLogs()" method will have a new "Request $request = null" argument in version 5.0, not defining it is deprecated since Symfony 4.2.
0 commit comments