Example #1
0
 public function testConfigMode()
 {
     $options = array('key' => 'myKey', 'exclude' => array('e1', 'e2'), 'field' => 'text', 'sort' => 'index', 'limit' => 10, 'offset' => 20, 'mincount' => 5, 'missing' => true, 'method' => 'enum');
     $this->facet->setOptions($options);
     $this->assertEquals($options['key'], $this->facet->getKey());
     $this->assertEquals($options['exclude'], $this->facet->getExcludes());
     $this->assertEquals($options['field'], $this->facet->getField());
     $this->assertEquals($options['sort'], $this->facet->getSort());
     $this->assertEquals($options['limit'], $this->facet->getLimit());
     $this->assertEquals($options['offset'], $this->facet->getOffset());
     $this->assertEquals($options['mincount'], $this->facet->getMinCount());
     $this->assertEquals($options['missing'], $this->facet->getMissing());
     $this->assertEquals($options['method'], $this->facet->getMethod());
 }