Exemple #1
0
 public function testTextField()
 {
     $fields = $this->item->getTextFields();
     $this->assertEquals(0, $fields->count());
     $index = new IndexText();
     $index->setField(Indexer::TEXT_ALL_DATA_FIELD);
     $index->setValue('test text');
     $this->item->addTextField($index);
     $fields = $this->item->getTextFields();
     $this->assertEquals('test text', $this->item->getRecordText());
     $this->assertEquals($index, $fields->get(0));
     $this->item->removeTextField($index);
     $fields = $this->item->getTextFields();
     $this->assertEquals(0, $fields->count());
 }
 public function testValueWithHyphen()
 {
     $this->index->setValue('text-value');
     $this->assertEquals('text-value', $this->index->getValue());
 }