public function testRemoveComponentWithObjectInput()
 {
     $mlt = new MoreLikeThis();
     $this->query->setComponent('mlt', $mlt);
     $this->assertEquals(array('mlt' => $mlt), $this->query->getComponents());
     $this->query->removeComponent($mlt);
     $this->assertEquals(array(), $this->query->getComponents());
 }
Beispiel #2
0
 /**
  * Get all registered components
  *
  * @return AbstractComponent[]
  */
 public function getComponents()
 {
     if (isset($this->components[self::COMPONENT_GROUPING])) {
         $this->components[self::COMPONENT_GROUPING]->setOption('resultquerygroupclass', 'Solarium\\Plugin\\MinimumScoreFilter\\QueryGroupResult');
         $this->components[self::COMPONENT_GROUPING]->setOption('resultvaluegroupclass', 'Solarium\\Plugin\\MinimumScoreFilter\\ValueGroupResult');
     }
     return parent::getComponents();
 }