Chris@0: assertEqual($ns['rdfs'], 'http://www.w3.org/2000/01/rdf-schema#', 'A prefix declared once is included.'); Chris@0: $this->assertEqual($ns['foaf'], 'http://xmlns.com/foaf/0.1/', 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'); Chris@0: $this->assertEqual($ns['foaf1'], 'http://xmlns.com/foaf/0.1/', 'Two prefixes can be assigned the same namespace.'); Chris@0: Chris@0: // Enable rdf_conflicting_namespaces to ensure that an exception is thrown Chris@0: // when RDF namespaces are conflicting. Chris@0: \Drupal::service('module_installer')->install(['rdf_conflicting_namespaces'], TRUE); Chris@0: try { Chris@0: $ns = rdf_get_namespaces(); Chris@0: $this->fail('Expected exception not thrown for conflicting namespace declaration.'); Chris@0: } Chris@0: catch (\Exception $e) { Chris@0: $this->pass('Expected exception thrown: ' . $e->getMessage()); Chris@0: } Chris@0: } Chris@0: Chris@0: }