public function testArrayRepresentationOfSolrQueryIsMemoized()
 {
     $this->stubCriteria->expects($this->once())->method('jsonSerialize')->willReturn(['fieldName' => 'foo', 'fieldValue' => 'bar', 'operation' => 'Equal']);
     $stubContext = $this->createMock(Context::class);
     $stubContext->method('getSupportedCodes')->willReturn([]);
     $this->stubQueryOptions->method('getContext')->willReturn($stubContext);
     $stubSortOrderConfig = $this->createMock(SortBy::class);
     $this->stubQueryOptions->method('getSortBy')->willReturn($stubSortOrderConfig);
     $resultA = $this->solrQuery->toArray();
     $resultB = $this->solrQuery->toArray();
     $this->assertSame($resultA, $resultB);
 }
 private function querySolr(SolrQuery $query, SolrFacetFilterRequest $facetFilterRequest) : SolrResponse
 {
     $queryParameters = $query->toArray();
     $facetParameters = $facetFilterRequest->toArray();
     $response = $this->client->select(array_merge($queryParameters, $facetParameters));
     return SolrResponse::fromSolrResponseArray($response, $this->facetFieldTransformationRegistry);
 }