1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-09 22:56:41 +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

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