/**
  * @param LifecycleEventArgs $args
  */
 public function postUpdate(LifecycleEventArgs $args)
 {
     $entity = $args->getEntity();
     try {
         $this->solrFacade->updateDocument($entity);
     } catch (\RuntimeException $e) {
     }
 }
示例#2
0
 public function testUpdateDocument()
 {
     $this->eventManager->expects($this->once())->method('handle')->with(EventManager::UPDATE);
     $this->setupMetaFactoryLoadOneCompleteInformation();
     $solr = new SolrFacade($this->connectionFactory, $this->commandFactory, $this->eventManager, $this->metaFactory);
     $solr->updateDocument(new ValidTestEntity());
     $this->assertTrue($this->solrClientFake->isCommited(), 'commit was never called');
 }