function ManageDisplayTest::testSingleViewMode

Tests hiding the view modes fieldset when there's only one available.

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.php, line 194
Contains \Drupal\field_ui\Tests\ManageDisplayTest.

Class

ManageDisplayTest
Tests the functionality of the 'Manage display' screens.

Namespace

Drupal\field_ui\Tests

Code

function testSingleViewMode() {
  $this
    ->drupalGet('admin/structure/taxonomy/manage/' . $this->vocabulary . '/display');
  $this
    ->assertNoText('Use custom display settings for the following view modes', 'Custom display settings fieldset found.');

  // This may not trigger a notice when 'view_modes_custom' isn't available.
  $this
    ->drupalPost('admin/structure/taxonomy/manage/' . $this->vocabulary . '/display', array(), t('Save'));
}