1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 19:00:20 +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

@@ -112,11 +112,12 @@ class ElasticsearchHandlerTest extends TestCase
*/
public function testSetFormatterInvalid()
{
$handler = new ElasticsearchHandler($this->client);
$formatter = new NormalizerFormatter();
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('ElasticsearchHandler is only compatible with ElasticsearchFormatter');
$handler = new ElasticsearchHandler($this->client);
$formatter = new NormalizerFormatter();
$handler->setFormatter($formatter);
}