public function testItem()
 {
     $this->assertNull($this->index->getItem());
     $item = new Item();
     $this->index->setItem($item);
     $this->assertEquals($item, $this->index->getItem());
 }
Ejemplo n.º 2
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());
 }