You are here

class FieldLayoutUninstallTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutUninstallTest
  2. 9 core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutUninstallTest

@group field_layout

Hierarchy

  • class \Drupal\Tests\field_layout\Kernel\FieldLayoutUninstallTest extends \Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase

Expanded class hierarchy of FieldLayoutUninstallTest

File

core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php, line 10

Namespace

Drupal\Tests\field_layout\Kernel
View source
class FieldLayoutUninstallTest extends LayoutBuilderCompatibilityTestBase {

  /**
   * Ensures field layout can be uninstalled with layout builder enabled.
   */
  public function testFieldLayoutUninstall() {

    // Setup user schema so user hook uninstall hook doesn't break.
    $this
      ->installSchema('user', 'users_data');

    // Setup layout builder and same displays.
    $this
      ->installLayoutBuilder();

    // Ensure install hook can handle displays without a layout.
    $this->container
      ->get('module_installer')
      ->install([
      'field_layout',
    ]);

    // Ensure uninstall hook can handle displays without a layout.
    $this->container
      ->get('module_installer')
      ->uninstall([
      'field_layout',
    ]);
  }

}

Members