/**
  * It should handle query execution and set the result.
  */
 public function testHandleQueryExecute()
 {
     $locale = 'fr';
     $primarySelector = 'p';
     $this->query->getLocale()->willReturn($locale);
     $this->query->getPhpcrQuery()->willReturn($this->phpcrQuery->reveal());
     $this->phpcrQuery->execute()->willReturn($this->phpcrResult->reveal());
     $this->query->getPrimarySelector()->willReturn($primarySelector);
     $this->queryExecuteEvent->getQuery()->willReturn($this->query->reveal());
     $this->queryExecuteEvent->getOptions()->willReturn([]);
     $this->queryExecuteEvent->setResult(new QueryResultCollection($this->phpcrResult->reveal(), $this->dispatcher->reveal(), $locale))->shouldBeCalled();
     $this->subscriber->handleQueryExecute($this->queryExecuteEvent->reveal());
 }