/** * @test */ public function findAllNamedEntities() { $this->obj->flush(); $ent = new NamedEntity(); $ent->xmlid = 'entity-1'; $ent->page = 22; $ent->chunk = 33; $ent->domain = 'person'; $ent->identifier = 44; $ent->notation = 'Named Entity 1'; $this->obj->save($ent); $ent = new NamedEntity(); $ent->xmlid = 'entity-123'; $ent->page = 55; $ent->chunk = 66; $ent->domain = 'person'; $ent->identifier = 77; $ent->notation = 'Named Entity 2'; $this->obj->save($ent); $objs = $this->obj->find(); $this->assertInternalType('array', $objs); $this->assertTrue(2 == count($objs)); $this->assertInstanceOf('TEIShredder\\NamedEntity', $objs[0]); $this->assertSame('Named Entity 1', $objs[0]->notation); $this->assertInstanceOf('TEIShredder\\NamedEntity', $objs[1]); $this->assertSame('Named Entity 2', $objs[1]->notation); }
/** * {@inheritDoc} */ protected function preProcessAction() { $this->elementGateway->flush($this->setup); $this->entityGateway->flush($this->setup); }