/**
  * Test for global aggregation toArray() method.
  *
  * @param GlobalAggregation $aggregation
  * @param array             $expectedResult
  *
  * @dataProvider getToArrayData
  */
 public function testToArray($aggregation, $expectedResult)
 {
     $this->assertEquals(json_encode($expectedResult), json_encode($aggregation->toArray()));
 }
 /**
  * Test for global aggregation toArray() method.
  *
  * @param GlobalAggregation $aggregation
  * @param array             $expectedResult
  *
  * @dataProvider getToArrayData
  */
 public function testToArray($aggregation, $expectedResult)
 {
     $this->assertEquals($expectedResult, $aggregation->toArray());
 }