/**
  * Data provider for testToArray().
  *
  * @return array
  */
 public function getTestToArrayData()
 {
     $out = [];
     $matchQuery = new MatchQuery('foo.bar.aux', 'foo');
     $nestedQuery = new NestedQuery('foo.bar', $matchQuery);
     $searchQuery = new Search();
     $searchQuery->addQuery($nestedQuery);
     $matchSearch = new Search();
     $matchSearch->addQuery($matchQuery);
     $innerHit = new NestedInnerHit('acme', 'foo', $searchQuery);
     $emptyInnerHit = new NestedInnerHit('acme', 'foo');
     $nestedInnerHit1 = new NestedInnerHit('aux', 'foo.bar.aux', $matchSearch);
     $nestedInnerHit2 = new NestedInnerHit('lux', 'foo.bar.aux', $matchSearch);
     $searchQuery->addInnerHit($nestedInnerHit1);
     $searchQuery->addInnerHit($nestedInnerHit2);
     $out[] = [$emptyInnerHit, ['path' => ['foo' => new \stdClass()]]];
     $out[] = [$nestedInnerHit1, ['path' => ['foo.bar.aux' => ['query' => $matchQuery->toArray()]]]];
     $out[] = [$innerHit, ['path' => ['foo' => ['query' => $nestedQuery->toArray(), 'inner_hits' => ['aux' => ['path' => ['foo.bar.aux' => ['query' => $matchQuery->toArray()]]], 'lux' => ['path' => ['foo.bar.aux' => ['query' => $matchQuery->toArray()]]]]]]]];
     return $out;
 }