function EntityDisplayFormBaseTest::testNoApplicableFormatters

Same name in other branches
  1. 10 core/modules/field_ui/tests/src/Functional/EntityDisplayFormBaseTest.php \Drupal\Tests\field_ui\Functional\EntityDisplayFormBaseTest::testNoApplicableFormatters()

Ensures the entity is not affected when there are no applicable formatters.

File

core/modules/field_ui/tests/src/Functional/EntityDisplayFormBaseTest.php, line 66

Class

EntityDisplayFormBaseTest
Tests the UI for configuring entity displays.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testNoApplicableFormatters() : void {
    $storage = $this->container
        ->get('entity_type.manager')
        ->getStorage('entity_form_display');
    $id = 'entity_test.entity_test.default';
    $entity_before = $storage->load($id);
    $this->drupalGet('entity_test/structure/entity_test/form-display');
    $entity_after = $storage->load($id);
    $this->assertSame($entity_before->toArray(), $entity_after->toArray());
}

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