\n"
. ""
. ""
. "\n";
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->loadXML($xmlth);
$databox = $this->createDatabox();
$databox->saveThesaurus($dom);
$newxml = $databox->get_thesaurus();
if (!$dom->loadXML($newxml)) {
$this->fail('Unable to load XML thesaurus');
}
$this->assertNotEquals("20100101000000", $dom->documentElement->getAttribute("modification_date"));
$this->assertEquals($testValue, $dom->documentElement->firstChild->getAttribute("value"));
$newdom = $databox->get_dom_thesaurus();
$this->assertNotEquals("20100101000000", $newdom->documentElement->getAttribute("modification_date"));
$this->assertEquals($testValue, $newdom->documentElement->firstChild->getAttribute("value"));
$databox->unmount_databox();
$databox->delete();
}
/**
* @covers databox::get_cterms
* @covers databox::get_dom_cterms
*/
public function test_get_cterms()
{
$testValue = rand(1000, 9999);
$xmlth = "\n"
. ""
. ""
. "\n";
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->loadXML($xmlth);
$databox = $this->createDatabox();
$databox->saveCterms($dom);
$newxml = $databox->get_cterms();
if (!$dom->loadXML($newxml)) {
$this->fail('Unable to load XML cterms');
}
$this->assertNotEquals("20100101000000", $dom->documentElement->getAttribute("modification_date"));
$this->assertEquals($testValue, $dom->documentElement->firstChild->getAttribute("value"));
$newdom = $databox->get_dom_cterms();
$this->assertNotEquals("20100101000000", $newdom->documentElement->getAttribute("modification_date"));
$this->assertEquals($testValue, $newdom->documentElement->firstChild->getAttribute("value"));
$databox->unmount_databox();
$databox->delete();
}
}