Loading core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ class BooleanFieldTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A field to use in this test class. Loading Loading @@ -122,7 +122,7 @@ public function testBooleanField() { // Verify that boolean value is displayed. $entity = EntityTest::load($id); $this->drupalGet($entity->toUrl()); $this->assertSession()->responseContains('<div class="field__item">' . $on . '</div>'); $this->assertSession()->pageTextContains($on); // Test with "On" label option. $display_repository->getFormDisplay('entity_test', 'entity_test') Loading core/modules/field/tests/src/Kernel/DisplayApiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,8 @@ protected function setUp(): void { public function testFieldItemListView() { $items = $this->entity->get($this->fieldName); \Drupal::service('theme_installer')->install(['classy']); $this->config('system.theme')->set('default', 'classy')->save(); \Drupal::service('theme_installer')->install(['stark']); $this->config('system.theme')->set('default', 'stark')->save(); // No display settings: check that default display settings are used. $build = $items->view(); Loading core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +11 −11 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase { protected function setUp(): void { parent::setUp(); // Use Classy theme for testing markup output. \Drupal::service('theme_installer')->install(['classy']); $this->config('system.theme')->set('default', 'classy')->save(); // Use Stark theme for testing markup output. \Drupal::service('theme_installer')->install(['stark']); $this->config('system.theme')->set('default', 'stark')->save(); $this->installEntitySchema('entity_test'); // Grant the 'view test entity' permission. $this->installConfig(['user']); Loading Loading @@ -201,12 +201,12 @@ public function testEntityFormatter() { // Test the first field item. $expected_rendered_name_field_1 = ' <div class="field field--name-name field--type-string field--label-hidden field__item">' . $this->referencedEntity->label() . '</div> <div>' . $this->referencedEntity->label() . '</div> '; $expected_rendered_body_field_1 = ' <div class="clearfix text-formatted field field--name-body field--type-text field--label-above"> <div class="field__label">Body</div> <div class="field__item"><p>Hello, world!</p></div> <div> <div>Body</div> <div><p>Hello, world!</p></div> </div> '; $renderer->renderRoot($build[0]); Loading @@ -217,12 +217,12 @@ public function testEntityFormatter() { // Test the second field item. $expected_rendered_name_field_2 = ' <div class="field field--name-name field--type-string field--label-hidden field__item">' . $this->unsavedReferencedEntity->label() . '</div> <div>' . $this->unsavedReferencedEntity->label() . '</div> '; $expected_rendered_body_field_2 = ' <div class="clearfix text-formatted field field--name-body field--type-text field--label-above"> <div class="field__label">Body</div> <div class="field__item"><p>Hello, unsaved world!</p></div> <div> <div>Body</div> <div><p>Hello, unsaved world!</p></div> </div> '; Loading core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class EntityDisplayTest extends WebDriverTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * {@inheritdoc} Loading Loading @@ -74,7 +74,7 @@ public function testEntityForm() { */ public function testEntityView() { $this->drupalGet('entity_test/1'); $this->assertSession()->elementNotExists('css', '.field--name-field-test-text'); $this->assertSession()->pageTextNotContains('The field test text value'); $this->drupalGet('entity_test/structure/entity_test/display'); $this->assertSession()->elementExists('css', '.region-content-message.region-empty'); Loading @@ -91,7 +91,7 @@ public function testEntityView() { $this->assertTrue($this->assertSession()->optionExists('fields[field_test_text][region]', 'content')->isSelected()); $this->drupalGet('entity_test/1'); $this->assertSession()->elementExists('css', '.field--name-field-test-text'); $this->assertSession()->pageTextContains('The field test text value'); } /** Loading Loading
core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ class BooleanFieldTest extends BrowserTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * A field to use in this test class. Loading Loading @@ -122,7 +122,7 @@ public function testBooleanField() { // Verify that boolean value is displayed. $entity = EntityTest::load($id); $this->drupalGet($entity->toUrl()); $this->assertSession()->responseContains('<div class="field__item">' . $on . '</div>'); $this->assertSession()->pageTextContains($on); // Test with "On" label option. $display_repository->getFormDisplay('entity_test', 'entity_test') Loading
core/modules/field/tests/src/Kernel/DisplayApiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -126,8 +126,8 @@ protected function setUp(): void { public function testFieldItemListView() { $items = $this->entity->get($this->fieldName); \Drupal::service('theme_installer')->install(['classy']); $this->config('system.theme')->set('default', 'classy')->save(); \Drupal::service('theme_installer')->install(['stark']); $this->config('system.theme')->set('default', 'stark')->save(); // No display settings: check that default display settings are used. $build = $items->view(); Loading
core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php +11 −11 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ class EntityReferenceFormatterTest extends EntityKernelTestBase { protected function setUp(): void { parent::setUp(); // Use Classy theme for testing markup output. \Drupal::service('theme_installer')->install(['classy']); $this->config('system.theme')->set('default', 'classy')->save(); // Use Stark theme for testing markup output. \Drupal::service('theme_installer')->install(['stark']); $this->config('system.theme')->set('default', 'stark')->save(); $this->installEntitySchema('entity_test'); // Grant the 'view test entity' permission. $this->installConfig(['user']); Loading Loading @@ -201,12 +201,12 @@ public function testEntityFormatter() { // Test the first field item. $expected_rendered_name_field_1 = ' <div class="field field--name-name field--type-string field--label-hidden field__item">' . $this->referencedEntity->label() . '</div> <div>' . $this->referencedEntity->label() . '</div> '; $expected_rendered_body_field_1 = ' <div class="clearfix text-formatted field field--name-body field--type-text field--label-above"> <div class="field__label">Body</div> <div class="field__item"><p>Hello, world!</p></div> <div> <div>Body</div> <div><p>Hello, world!</p></div> </div> '; $renderer->renderRoot($build[0]); Loading @@ -217,12 +217,12 @@ public function testEntityFormatter() { // Test the second field item. $expected_rendered_name_field_2 = ' <div class="field field--name-name field--type-string field--label-hidden field__item">' . $this->unsavedReferencedEntity->label() . '</div> <div>' . $this->unsavedReferencedEntity->label() . '</div> '; $expected_rendered_body_field_2 = ' <div class="clearfix text-formatted field field--name-body field--type-text field--label-above"> <div class="field__label">Body</div> <div class="field__item"><p>Hello, unsaved world!</p></div> <div> <div>Body</div> <div><p>Hello, unsaved world!</p></div> </div> '; Loading
core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class EntityDisplayTest extends WebDriverTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'classy'; protected $defaultTheme = 'stark'; /** * {@inheritdoc} Loading Loading @@ -74,7 +74,7 @@ public function testEntityForm() { */ public function testEntityView() { $this->drupalGet('entity_test/1'); $this->assertSession()->elementNotExists('css', '.field--name-field-test-text'); $this->assertSession()->pageTextNotContains('The field test text value'); $this->drupalGet('entity_test/structure/entity_test/display'); $this->assertSession()->elementExists('css', '.region-content-message.region-empty'); Loading @@ -91,7 +91,7 @@ public function testEntityView() { $this->assertTrue($this->assertSession()->optionExists('fields[field_test_text][region]', 'content')->isSelected()); $this->drupalGet('entity_test/1'); $this->assertSession()->elementExists('css', '.field--name-field-test-text'); $this->assertSession()->pageTextContains('The field test text value'); } /** Loading