Chris@0: drupalGet(''); Chris@0: Chris@0: $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ Chris@0: ':prefix_binding' => 'rdfs: http://www.w3.org/2000/01/rdf-schema#', Chris@0: ]); Chris@0: $this->assertTrue(!empty($element), 'A prefix declared once is displayed.'); Chris@0: Chris@0: $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ Chris@0: ':prefix_binding' => 'foaf: http://xmlns.com/foaf/0.1/', Chris@0: ]); Chris@0: $this->assertTrue(!empty($element), 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'); Chris@0: Chris@0: $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ Chris@0: ':prefix_binding' => 'foaf1: http://xmlns.com/foaf/0.1/', Chris@0: ]); Chris@0: $this->assertTrue(!empty($element), 'Two prefixes can be assigned the same namespace.'); Chris@0: Chris@0: $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ Chris@0: ':prefix_binding' => 'dc: http://purl.org/dc/terms/', Chris@0: ]); Chris@0: $this->assertTrue(!empty($element), 'When a prefix has conflicting namespaces, the first declared one is used.'); Chris@0: } Chris@0: Chris@0: }