FieldLayoutUninstallTest.php in Drupal 9
Same filename and directory in other branches
Namespace
Drupal\Tests\field_layout\KernelFile
core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.phpView source
<?php
namespace Drupal\Tests\field_layout\Kernel;
use Drupal\Tests\layout_builder\Kernel\LayoutBuilderCompatibilityTestBase;
/**
* @group field_layout
*/
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',
]);
}
}
Classes
Name | Description |
---|---|
FieldLayoutUninstallTest | @group field_layout |