Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
This is a cleanup issue for something that was pointed by alexpott and webchick. Each Drupal unit test still takes some time to bootstrap Drupal, even if it's not as long as a full install.
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php
@@ -0,0 +1,64 @@
+ /**
+ * Tests the plain formatter.
+ */
+ public function testPlainFormatter() {
+ $this->assertFormatterRdfa('text_plain', 'http://schema.org/email', $this->testValue);
+ }
+
+ /**
+ * Tests the mailto formatter.
+ */
+ public function testMailToFormatter() {
+ $this->assertFormatterRdfa('email_mailto', 'http://schema.org/email', $this->testValue);
+ }
Proposed resolution
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php
@@ -0,0 +1,64 @@
+ /**
+ * Tests all the formatters.
+ */
+ public function testAllFormatters() {
+ // Tests the plain formatter.
+ $this->assertFormatterRdfa('text_plain', 'http://schema.org/email', $this->testValue);
+ // Tests the mailto formatter.
+ $this->assertFormatterRdfa('email_mailto', 'http://schema.org/email', $this->testValue);
+ }
Comment | File | Size | Author |
---|---|---|---|
#3 | 2199845-3-mergeTests.patch | 2.86 KB | kay_v |
Comments
Comment #1
kay_v CreditAttribution: kay_v commentedComment #2
scor CreditAttribution: scor commentedThe only tests that need to be updated here are:
- TaxonomyTermReferenceRdfaTest.php
- TextFieldRdfaTest.php
Comment #3
kay_v CreditAttribution: kay_v commentedmerged separate rdf formatter tests into a single unit test in each of the following:
- TaxonomyTermReferenceRdfaTest.php
- TextFieldRdfaTest.php
Comment #4
scor CreditAttribution: scor commentedThis looks good Kay, and should speed up the test runs a little bit...
Comment #5
alexpottCommitted ac0679d and pushed to 8.x. Thanks!