1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +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

@@ -96,8 +96,6 @@ class AbstractProcessingHandlerTest extends TestCase
*/
public function testPushPopProcessor()
{
$this->expectException(\LogicException::class);
$logger = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler');
$processor1 = new WebProcessor;
$processor2 = new WebProcessor;
@@ -107,6 +105,9 @@ class AbstractProcessingHandlerTest extends TestCase
$this->assertEquals($processor2, $logger->popProcessor());
$this->assertEquals($processor1, $logger->popProcessor());
$this->expectException(\LogicException::class);
$logger->popProcessor();
}
@@ -115,10 +116,10 @@ class AbstractProcessingHandlerTest extends TestCase
*/
public function testPushProcessorWithNonCallable()
{
$this->expectException(\TypeError::class);
$handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler');
$this->expectException(\TypeError::class);
$handler->pushProcessor(new \stdClass());
}