示例#1
0
 public function testConfigMode()
 {
     $options = array('snippets' => 3, 'fragsize' => 25, 'mergecontiguous' => true, 'alternatefield' => 'text', 'formatter' => 'myFormatter', 'simpleprefix' => '<b>', 'simplepostfix' => '</b>', 'fragmenter' => 'myFragmenter', 'usefastvectorhighlighter' => true);
     $this->fld->setOptions($options);
     $this->assertEquals(3, $this->fld->getSnippets());
     $this->assertEquals(25, $this->fld->getFragSize());
     $this->assertEquals(true, $this->fld->getMergeContiguous());
     $this->assertEquals('text', $this->fld->getAlternateField());
     $this->assertEquals('myFormatter', $this->fld->getFormatter());
     $this->assertEquals('<b>', $this->fld->getSimplePrefix());
     $this->assertEquals('</b>', $this->fld->getSimplePostfix());
     $this->assertEquals('myFragmenter', $this->fld->getFragmenter());
     $this->assertEquals(true, $this->fld->getUseFastVectorHighlighter());
 }