/** * @depends testCreateClient */ public function testClientConnect() { $client = \ElasticsearchTest\Bootstrap::getServiceManager()->get('Elasticsearch\\Client'); /* @var $client \Elasticsearch\Client */ $info = $client->info(); $this->assertNotEmpty($info, "The es client should have retrieve some informations about cluster"); $this->assertTrue($info['ok'], "Client is normally connected"); $this->assertEquals(200, $info['status'], 'Node status should be equal to 200'); }