Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function testCreateClient(): void |
||
24 | { |
||
25 | $factory = $this->createMock(ElasticClientFactoryInterface::class); |
||
26 | $client = $this->createMock(ClientInterface::class); |
||
27 | $factory->expects($this->once()) |
||
28 | ->method('create') |
||
29 | ->with('test') |
||
30 | ->willReturn($client); |
||
31 | |||
32 | $facade = new ElasticFacade( |
||
33 | $factory |
||
34 | ); |
||
35 | |||
36 | $this->assertEquals($client, $facade->createClient('test')); |
||
37 | } |
||
39 |