function BookUninstallTest::setUp

Same name in other branches
  1. 9 core/modules/book/tests/src/Kernel/BookUninstallTest.php \Drupal\Tests\book\Kernel\BookUninstallTest::setUp()
  2. 10 core/modules/book/tests/src/Kernel/BookUninstallTest.php \Drupal\Tests\book\Kernel\BookUninstallTest::setUp()
  3. 11.x core/modules/book/tests/src/Kernel/BookUninstallTest.php \Drupal\Tests\book\Kernel\BookUninstallTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/book/tests/src/Kernel/BookUninstallTest.php, line 34

Class

BookUninstallTest
Tests that the Book module cannot be uninstalled if books exist.

Namespace

Drupal\Tests\book\Kernel

Code

protected function setUp() {
    parent::setUp();
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    $this->installSchema('book', [
        'book',
    ]);
    $this->installSchema('node', [
        'node_access',
    ]);
    $this->installConfig([
        'node',
        'book',
        'field',
    ]);
    // For uninstall to work.
    $this->installSchema('user', [
        'users_data',
    ]);
}

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