public function testAddRemoveRelation() { $termType = new KVDthes_TermType('PT', 'voorkeursterm'); $term2 = new KVDthes_TestTerm(508, $this->sessie, 'kapellen', $termType, 'bouwkundig erfgoed'); $this->object->setLoadState(KVDthes_Term::LS_REL); $this->object->setLoadState(KVDthes_Term::LS_MATCH); $this->object->setLoadState(KVDthes_Term::LS_NOTES); $term2->setLoadState(KVDthes_Term::LS_REL); $term2->setLoadState(KVDthes_Term::LS_MATCH); $term2->setLoadState(KVDthes_Term::LS_NOTES); $this->object->setType(new KVDthes_TermType('ND', 'Non Descriptor')); $this->object->addRelation(new KVDthes_Relation(KVDthes_Relation::REL_USE, $term2)); $this->assertEquals($term2, $this->object->getPreferredTerm()); $term2->removeRelation(new KVDthes_Relation(KVDthes_Relation::REL_UF, $this->object)); $this->assertEquals($term2, $term2->getPreferredTerm()); }