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);
+  }
CommentFileSizeAuthor
#3 2199845-3-mergeTests.patch2.86 KBkay_v
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kay_v’s picture

Assigned: Unassigned » kay_v
scor’s picture

The only tests that need to be updated here are:
- TaxonomyTermReferenceRdfaTest.php
- TextFieldRdfaTest.php

kay_v’s picture

Status: Active » Needs review
FileSize
2.86 KB

merged separate rdf formatter tests into a single unit test in each of the following:
- TaxonomyTermReferenceRdfaTest.php
- TextFieldRdfaTest.php

scor’s picture

Status: Needs review » Reviewed & tested by the community

This looks good Kay, and should speed up the test runs a little bit...

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ac0679d and pushed to 8.x. Thanks!

  • Commit ac0679d on 8.x by alexpott:
    Issue #2199845 by kay_v | scor: Merge all assertFormatterRdfa() unit...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.