public function testMediaType() { $lang = MwRdf::MediaType('text/html'); $this->assertTrue($lang instanceof LibRDF_LiteralNode); $ns = MwRdf::getNamespace('dc'); $this->assertEquals($ns . 'IMT', $lang->getDatatype()); $this->assertEquals("text/html^^<{$ns}IMT>", "{$lang}"); }
public function testTimestampResource() { $res = MwRdf::TimestampResource(time()); $this->assertTrue($res instanceof LibRDF_LiteralNode, get_class($res)); $ns = MwRdf::getNamespace('dc'); $this->assertEquals($ns . 'W3CDTF', $res->getDatatype()); }