diff --git a/core/modules/rdf/src/Tests/GetNamespacesTest.php b/core/modules/rdf/src/Tests/GetNamespacesTest.php deleted file mode 100644 index ca46c5c..0000000 --- a/core/modules/rdf/src/Tests/GetNamespacesTest.php +++ /dev/null @@ -1,50 +0,0 @@ -drupalGet(''); - - $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ - ':prefix_binding' => 'rdfs: http://www.w3.org/2000/01/rdf-schema#', - ]); - $this->assertTrue(!empty($element), 'A prefix declared once is displayed.'); - - $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ - ':prefix_binding' => 'foaf: http://xmlns.com/foaf/0.1/', - ]); - $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.'); - - $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ - ':prefix_binding' => 'foaf1: http://xmlns.com/foaf/0.1/', - ]); - $this->assertTrue(!empty($element), 'Two prefixes can be assigned the same namespace.'); - - $element = $this->xpath('//html[contains(@prefix, :prefix_binding)]', [ - ':prefix_binding' => 'dc: http://purl.org/dc/terms/', - ]); - $this->assertTrue(!empty($element), 'When a prefix has conflicting namespaces, the first declared one is used.'); - } - -} diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php similarity index 99% rename from core/modules/rdf/src/Tests/CommentAttributesTest.php rename to core/modules/rdf/tests/src/Functional/CommentAttributesTest.php index 8ca5798..973e162 100644 --- a/core/modules/rdf/src/Tests/CommentAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/CommentAttributesTest.php @@ -1,12 +1,12 @@ drupalGet(''); + + $page = $this->getSession()->getPage(); + $html = $page->find('css', 'html'); + $prefix = $html->getAttribute('prefix'); + + $this->assertContains('rdfs: http://www.w3.org/2000/01/rdf-schema#', $prefix, 'A prefix declared once is displayed.'); + $this->assertContains('foaf: http://xmlns.com/foaf/0.1/', $prefix, 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'); + $this->assertContains('foaf1: http://xmlns.com/foaf/0.1/', $prefix, 'Two prefixes can be assigned the same namespace.'); + $this->assertContains('dc: http://purl.org/dc/terms/', $prefix, 'When a prefix has conflicting namespaces, the first declared one is used.'); + } + +} diff --git a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php similarity index 97% rename from core/modules/rdf/src/Tests/ImageFieldAttributesTest.php rename to core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php index d4d7d35..4d25c39 100644 --- a/core/modules/rdf/src/Tests/ImageFieldAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/ImageFieldAttributesTest.php @@ -1,11 +1,11 @@