summaryrefslogtreecommitdiffstats
path: root/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php')
-rw-r--r--core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php
index f5974bb..120d6f0 100644
--- a/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php
+++ b/core/modules/rdf/src/Tests/Field/NumberFieldRdfaTest.php
@@ -24,7 +24,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa(array('type' => 'number_integer'), 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is not created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]');
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
$this->assertFalse($result);
}
@@ -32,6 +32,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
* Tests the integer formatter with settings.
*/
public function testIntegerFormatterWithSettings() {
+ \Drupal::service('theme_handler')->install(['classy']);
+ $this->config('system.theme')->set('default', 'classy')->save();
$this->fieldType = 'integer';
$formatter = array(
'type' => 'number_integer',
@@ -50,7 +52,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $testValue));
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', array(':testValue' => $testValue));
$this->assertTrue($result);
}
@@ -65,7 +67,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa(array('type' => 'number_unformatted'), 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is not created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]');
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
$this->assertFalse($result);
}
@@ -73,6 +75,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
* Tests the float formatter with settings.
*/
public function testFloatFormatterWithSettings() {
+ \Drupal::service('theme_handler')->install(['classy']);
+ $this->config('system.theme')->set('default', 'classy')->save();
$this->fieldType = 'float';
$formatter = array(
'type' => 'number_decimal',
@@ -92,7 +96,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $testValue));
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', array(':testValue' => $testValue));
$this->assertTrue($result);
}
@@ -113,7 +117,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is not created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]');
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
$this->assertFalse($result);
}
@@ -121,6 +125,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
* Tests the float formatter with a scale. Scale is exercised.
*/
public function testFloatFormatterWithScaleExercised() {
+ \Drupal::service('theme_handler')->install(['classy']);
+ $this->config('system.theme')->set('default', 'classy')->save();
$this->fieldType = 'float';
$formatter = array(
'type' => 'number_decimal',
@@ -134,7 +140,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $testValue));
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', array(':testValue' => $testValue));
$this->assertTrue($result);
}
@@ -149,7 +155,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa(array('type' => 'number_decimal'), 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is not created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content]');
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__items") and @content]');
$this->assertFalse($result);
}
@@ -157,6 +163,8 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
* Tests the decimal formatter with settings.
*/
public function testDecimalFormatterWithSettings() {
+ \Drupal::service('theme_handler')->install(['classy']);
+ $this->config('system.theme')->set('default', 'classy')->save();
$this->fieldType = 'decimal';
$formatter = array(
'type' => 'number_decimal',
@@ -176,7 +184,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
$this->assertFormatterRdfa($formatter, 'http://schema.org/baseSalary', array('value' => $testValue));
// Test that the content attribute is created.
- $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field-item") and @content=:testValue]', array(':testValue' => $testValue));
+ $result = $this->xpathContent($this->getRawContent(), '//div[contains(@class, "field__item") and @content=:testValue]', array(':testValue' => $testValue));
$this->assertTrue($result);
}