function testGetReferrent() { $mdr1 = Metadata_Reference::getOneFromDb(['metadata_reference_id' => 6301], $this->DB); $mdr2 = Metadata_Reference::getOneFromDb(['metadata_reference_id' => 6302], $this->DB); $mdr3 = Metadata_Reference::getOneFromDb(['metadata_reference_id' => 6303], $this->DB); $mdrX = new Metadata_Reference(['metadata_reference_id' => 10001, 'DB' => $this->DB]); $r1 = $mdr1->getReferrent(); $r2 = $mdr2->getReferrent(); $r3 = $mdr3->getReferrent(); $rX = $mdrX->getReferrent(); $this->assertEqual(6001, $r1->metadata_structure_id); $this->assertEqual(6101, $r2->metadata_term_set_id); $this->assertEqual(6211, $r3->metadata_term_value_id); $this->assertEqual('UNKNOWN METADATA_TYPE: //', $rX); }