Ejemplo n.º 1
0
 public function testSetFacets()
 {
     $fq1 = new FacetQuery();
     $fq1->setKey('f1')->setQuery('category:1');
     $fq2 = new FacetQuery();
     $fq2->setKey('f2')->setQuery('category:2');
     $facets = array('f1' => $fq1, 'f2' => $fq2);
     $this->facetSet->addFacets($facets);
     $fq3 = new FacetQuery();
     $fq3->setKey('f3')->setQuery('category:3');
     $fq4 = new FacetQuery();
     $fq4->setKey('f4')->setQuery('category:4');
     $facets = array('f3' => $fq3, 'f4' => $fq4);
     $this->facetSet->setFacets($facets);
     $this->assertEquals($facets, $this->facetSet->getFacets());
 }