You are here

public function ManageDisplayTest::testViewModeLocalTasks in Drupal 9

Same name and namespace in other branches
  1. 8 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 167

Class

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

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testViewModeLocalTasks() {
  $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');
}