Esempio n. 1
0
 public function testConfigMode()
 {
     $options = array('key' => 'myKey', 'exclude' => array('e1', 'e2'), 'query' => 'category:1');
     $this->facet->setOptions($options);
     $this->assertEquals($options['key'], $this->facet->getKey());
     $this->assertEquals($options['exclude'], $this->facet->getExcludes());
     $this->assertEquals($options['query'], $this->facet->getQuery());
 }
Esempio n. 2
0
 /**
  * Add params for a facet query to request
  *
  * @param  Request    $request
  * @param  FacetQuery $facet
  * @return void
  */
 public function addFacetQuery($request, $facet)
 {
     $request->addParam('facet.query', $this->renderLocalParams($facet->getQuery(), array('key' => $facet->getKey(), 'ex' => $facet->getExcludes())));
 }