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

@@ -135,7 +135,7 @@ class ProcessHandlerTest extends TestCase
->method('selectErrorStream')
->will($this->returnValue(false));
$this->expectException('\UnexpectedValueException');
$this->expectException(\UnexpectedValueException::class);
/** @var ProcessHandler $handler */
$handler->handle($this->getRecord(Logger::WARNING, 'stream failing, whoops'));
}
@@ -147,7 +147,9 @@ class ProcessHandlerTest extends TestCase
public function testStartupWithErrorsThrowsUnexpectedValueException()
{
$handler = new ProcessHandler('>&2 echo "some fake error message"');
$this->expectException('\UnexpectedValueException');
$this->expectException(\UnexpectedValueException::class);
$handler->handle($this->getRecord(Logger::WARNING, 'some warning in the house'));
}
@@ -167,7 +169,7 @@ class ProcessHandlerTest extends TestCase
->method('readProcessErrors')
->willReturnOnConsecutiveCalls('', $this->returnValue('some fake error message here'));
$this->expectException('\UnexpectedValueException');
$this->expectException(\UnexpectedValueException::class);
/** @var ProcessHandler $handler */
$handler->handle($this->getRecord(Logger::WARNING, 'some test stuff'));
}