public function testClearRelation() { $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(1, count($this->object->getRelations())); $this->object->clearRelations(); $this->assertEquals(0, count($this->object->getRelations())); }