function ManageDisplayTest::testViewModeLocalTasks

Same name and namespace in other branches
  1. 9 core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::testViewModeLocalTasks()
  2. 8.9.x core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::testViewModeLocalTasks()
  3. 11.x core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php \Drupal\Tests\field_ui\Functional\ManageDisplayTest::testViewModeLocalTasks()

Tests the local tasks are displayed correctly for view modes.

File

core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php, line 181

Class

ManageDisplayTest
Tests the Field UI "Manage display" and "Manage form display" screens.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testViewModeLocalTasks() : void {
  $manage_display = 'admin/structure/types/manage/' . $this->type . '/display';
  $this->drupalGet($manage_display);
  $this->assertSession()
    ->linkNotExists('Full content');
  $this->assertSession()
    ->linkExists('Teaser');
  $this->drupalGet($manage_display . '/teaser');
  $this->assertSession()
    ->linkNotExists('Full content');
  $this->assertSession()
    ->linkExists('Default');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.