/**
  * Test for getAggregations() in case aggregations are already cached.
  */
 public function testGetAggregationsCached()
 {
     $aggPrefix = AbstractAggregation::PREFIX;
     $rawData = ['doc_count' => 15, $aggPrefix . 'foo' => ['doc_count' => 1]];
     $aggregation = new ValueAggregation($rawData);
     $this->assertEquals($aggregation->getAggregations(), $aggregation->getAggregations());
 }
 /**
  * Test for getAggregations() in case aggregations are already cached.
  */
 public function testGetAggregationsCached()
 {
     $rawData = ['doc_count' => 15, 'agg_foo' => ['doc_count' => 1]];
     $aggregation = new ValueAggregation($rawData);
     $this->assertEquals($aggregation->getAggregations(), $aggregation->getAggregations());
 }