_getClient(); $index = $client->getIndex($indexName); $index->create(array(), true); $stats = $index->getStats(); $this->assertInstanceOf('Elastica\Index\Stats', $stats); $this->assertTrue($stats->getResponse()->isOk()); $this->assertEquals(0, $stats->get('_all', 'indices', 'test', 'primaries', 'docs', 'count')); } }