diff --git a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php index 23398e0..b6c846d 100644 --- a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php +++ b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php @@ -33,7 +33,7 @@ public function testIntegerFormatter() { $this->assertFormatterRdfa(array('type' => $this->fieldType), 'http://schema.org/baseSalary', array('value' => $this->testValue)); // Test that the content attribute is not created. - $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $this->testValue)); + $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]', array(':testValue' => $this->testValue)); $this->assertFalse($result); } @@ -74,7 +74,7 @@ public function testFloatFormatter() { $this->assertFormatterRdfa(array('type' => $this->fieldType), 'http://schema.org/baseSalary', array('value' => $this->testValue)); // Test that the content attribute is not created. - $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $this->testValue)); + $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]', array(':testValue' => $this->testValue)); $this->assertFalse($result); } @@ -120,6 +120,10 @@ public function testFloatFormatterWithScale() { $this->createTestField(); $this->createTestEntity(); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $this->testValue)); + + // Test that the content attribute is not created. + $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]', array(':testValue' => $this->testValue)); + $this->assertFalse($result); } /** @@ -133,7 +137,7 @@ public function testDecimalFormatter() { $this->assertFormatterRdfa(array('type' => $this->fieldType), 'http://schema.org/baseSalary', array('value' => $this->testValue)); // Test that the content attribute is not created. - $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $this->testValue)); + $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]', array(':testValue' => $this->testValue)); $this->assertFalse($result); } @@ -159,7 +163,7 @@ public function testDecimalFormatterWithSettings() { $this->createTestEntity(); $this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $this->testValue)); - // Test that the content attribute is not created. + // Test that the content attribute is created. $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $this->testValue)); $this->assertTrue($result); }