Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / views / tests / src / Functional / Plugin / DisplayEntityReferenceTest.php
index daad14896e47b44a08bc38ed6daec0c2f00817bc..817c51d7875adf8e0b3bab69f0a2cfcad1c5a28d 100644 (file)
@@ -5,7 +5,7 @@ namespace Drupal\Tests\views\Functional\Plugin;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
+use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
 use Drupal\Tests\views\Functional\ViewTestBase;
 use Drupal\views\Views;
 
@@ -125,6 +125,10 @@ class DisplayEntityReferenceTest extends ViewTestBase {
    * Tests the entity reference display plugin.
    */
   public function testEntityReferenceDisplay() {
+    // Test that the 'title' settings are not shown.
+    $this->drupalGet('admin/structure/views/view/test_display_entity_reference/edit/entity_reference_1');
+    $this->assertSession()->linkByHrefNotExists('admin/structure/views/nojs/display/test_display_entity_reference/entity_reference_1/title');
+
     // Add the new field to the fields.
     $this->drupalPostForm('admin/structure/views/nojs/add-handler/test_display_entity_reference/default/field', ['name[entity_test__' . $this->fieldName . '.' . $this->fieldName . ']' => TRUE], t('Add and configure fields'));
     $this->drupalPostForm(NULL, [], t('Apply'));
@@ -209,7 +213,7 @@ class DisplayEntityReferenceTest extends ViewTestBase {
     $this->drupalPostForm('admin/structure/views/nojs/display/test_display_entity_reference/entity_reference_1/style_options', ['style_options[search_fields][uid]' => 'uid'], t('Apply'));
     $this->drupalPostForm(NULL, [], t('Save'));
 
-    // Test that the search still works with the ralated field.
+    // Test that the search still works with the related field.
     $view = Views::getView('test_display_entity_reference');
     $view->setDisplay('entity_reference_1');