예제 #1
0
 /**
  * @Then /^I should not find the entity in Solr$/
  */
 public function iShouldNotFindTheEntityInSolr()
 {
     $client = $this->getSolrClient();
     $entityId = $this->entity->getId();
     $query = $client->createSelect();
     $query->setQuery(sprintf('id:%s', $entityId));
     $resultset = $client->select($query);
     if ($resultset->getNumFound() > 0) {
         throw new \RuntimeException(sprintf('document with id %s should not found in the index', $entityId));
     }
 }