Open leonrenkema opened 1 year ago
Hi,
I saw the issue (#1227) where an interface for the Client is added to support mocking in the unittest.
Maybe it is an idea to also let the ClientBuilder have the ClientInterfaceas returntype instead of Client.
ClientInterface
Client
https://github.com/elastic/elasticsearch-php/blob/9a734ac64798fe242d49a00d5f335c1cf45429c0/src/ClientBuilder.php#L158
Then it will be possible to Mock the ClientBuilder and let fromConfigreturn a mocked instance.
ClientBuilder
fromConfig
Hi,
I saw the issue (#1227) where an interface for the Client is added to support mocking in the unittest.
Maybe it is an idea to also let the ClientBuilder have the
ClientInterface
as returntype instead ofClient
.https://github.com/elastic/elasticsearch-php/blob/9a734ac64798fe242d49a00d5f335c1cf45429c0/src/ClientBuilder.php#L158
Then it will be possible to Mock the
ClientBuilder
and letfromConfig
return a mocked instance.