1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 23:54:04 +02:00

Move expectException before the line where exception is thrown

This commit is contained in:
Mario Blažek
2019-08-13 15:34:48 +02:00
parent 37900f9268
commit d317cb97d3
13 changed files with 62 additions and 45 deletions

View File

@@ -132,11 +132,12 @@ class FingersCrossedHandlerTest extends TestCase
*/
public function testHandleWithBadCallbackThrowsException()
{
$this->expectException(\RuntimeException::class);
$handler = new FingersCrossedHandler(function ($record, $handler) {
return 'foo';
});
$this->expectException(\RuntimeException::class);
$handler->handle($this->getRecord(Logger::WARNING));
}