| 7 rdf.test | RdfGetRdfNamespacesTestCase::testGetRdfNamespaces() |
| 8 rdf.test | RdfGetRdfNamespacesTestCase::testGetRdfNamespaces() |
Test getting RDF namesapces.
File
- modules/
rdf/ rdf.test, line 706 - Tests for rdf.module.
Code
function testGetRdfNamespaces() {
// Get all RDF namespaces.
$ns = rdf_get_namespaces();
$this->assertEqual($ns['rdfs'], 'http://www.w3.org/2000/01/rdf-schema#', t('A prefix declared once is included.'));
$this->assertEqual($ns['foaf'], 'http://xmlns.com/foaf/0.1/', t('The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'));
$this->assertEqual($ns['foaf1'], 'http://xmlns.com/foaf/0.1/', t('Two prefixes can be assigned the same namespace.'));
$this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
}
Login or register to post comments