summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2014-04-18 12:54:36 (GMT)
committerAlex Pott2014-04-18 12:54:36 (GMT)
commitac0679d7aeeda9d81849ccb07b14e9dbc989fa65 (patch)
tree9901fd8d8a179603904b3e603c9a79ee8bb7cab8
parentc1b72d4e02cab59130445ce702375b8e89b6af70 (diff)
Issue #2199845 by kay_v | scor: Merge all assertFormatterRdfa() unit test calls into one single unit test.
-rw-r--r--core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php10
-rw-r--r--core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php32
2 files changed, 11 insertions, 31 deletions
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php
index 00ac9d7..5086bf1 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TaxonomyTermReferenceRdfaTest.php
@@ -102,14 +102,10 @@ class TaxonomyTermReferenceRdfaTest extends FieldRdfaTestBase {
/**
* Tests the plain formatter.
*/
- public function testPlainFormatter() {
+ public function testAllFormatters() {
+ // Tests the plain formatter.
$this->assertFormatterRdfa(array('type' => 'taxonomy_term_reference_plain'), 'http://schema.org/about', array('value' => $this->term->getName(), 'type' => 'literal'));
- }
-
- /**
- * Tests the link formatter.
- */
- public function testLinkFormatter() {
+ // Tests the link formatter.
$term_uri = $this->getAbsoluteUri($this->term);
$this->assertFormatterRdfa(array('type'=>'taxonomy_term_reference_link'), 'http://schema.org/about', array('value' => $term_uri, 'type' => 'uri'));
}
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
index 854c128..f1af767 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/TextFieldRdfaTest.php
@@ -63,34 +63,18 @@ class TextFieldRdfaTest extends FieldRdfaTestBase {
}
/**
- * Tests the default formatter.
- */
- public function testDefaultFormatter() {
- $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/text', array('value' => $this->testValue));
- }
-
- /**
- * Tests the plain formatter.
- */
- public function testPlainFormatter() {
- $this->assertFormatterRdfa(array('type'=>'string'), 'http://schema.org/text', array('value' => $this->testValue));
- }
-
- /**
- * Tests the summary formatter.
+ * Tests all formatters.
*
* @todo Check for the summary mapping.
*/
- public function testSummaryFormatter() {
+ public function testAllFormatters() {
+ // Tests the default formatter.
+ $this->assertFormatterRdfa(array('type'=>'text_default'), 'http://schema.org/text', array('value' => $this->testValue));
+ // Tests the plain formatter.
+ $this->assertFormatterRdfa(array('type'=>'string'), 'http://schema.org/text', array('value' => $this->testValue));
+ // Tests the summary formatter.
$this->assertFormatterRdfa(array('type'=>'text_summary_or_trimmed'), 'http://schema.org/text', array('value' => $this->testValue));
- }
-
- /**
- * Tests the trimmed formatter.
- *
- * @todo Check for the summary mapping.
- */
- public function testTrimmedFormatter() {
+ // Tests the trimmed formatter.
$this->assertFormatterRdfa(array('type'=>'text_trimmed'), 'http://schema.org/text', array('value' => $this->testValue));
}
}