File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
tests/Elasticsearch/Tests Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 2121use Elasticsearch \Client ;
2222use Elasticsearch \ClientBuilder ;
2323use Elasticsearch \Common \Exceptions \ElasticsearchException ;
24- use Elasticsearch \Common \ Exceptions \ InvalidArgumentException ;
24+ use Elasticsearch \Tests \ ClientBuilder \ DummyLogger ;
2525use PHPUnit \Framework \TestCase ;
2626
2727class ClientBuilderTest extends TestCase
2828{
2929
3030 public function testClientBuilderThrowsExceptionForIncorrectLoggerClass ()
3131 {
32- $ this ->expectException (InvalidArgumentException::class);
33- $ this ->expectExceptionMessage ('$logger must implement \Psr\Log\LoggerInterface! ' );
34-
35- ClientBuilder::create ()->setLogger (new \Elasticsearch \Tests \ClientBuilder \DummyLogger ());
32+ $ this ->expectException (\TypeError::class);
33+ ClientBuilder::create ()->setLogger (new DummyLogger );
3634 }
3735
3836 public function testClientBuilderThrowsExceptionForIncorrectTracerClass ()
3937 {
40- $ this ->expectException (InvalidArgumentException::class);
41- $ this ->expectExceptionMessage ('$tracer must implement \Psr\Log\LoggerInterface! ' );
42-
43- ClientBuilder::create ()->setTracer (new \Elasticsearch \Tests \ClientBuilder \DummyLogger ());
38+ $ this ->expectException (\TypeError::class);
39+ ClientBuilder::create ()->setTracer (new DummyLogger );
4440 }
4541
4642 public function testElasticClientMetaHeaderIsSentByDefault ()
You can’t perform that action at this time.
0 commit comments