You are here

protected function BookBreadcrumbTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/book/tests/src/Functional/BookBreadcrumbTest.php \Drupal\Tests\book\Functional\BookBreadcrumbTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/book/tests/src/Functional/BookBreadcrumbTest.php, line 50

Class

BookBreadcrumbTest
Create a book, add pages, and test book interface.

Namespace

Drupal\Tests\book\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->drupalPlaceBlock('system_breadcrumb_block');
  $this
    ->drupalPlaceBlock('page_title_block');

  // Create users.
  $this->bookAuthor = $this
    ->drupalCreateUser([
    'create new books',
    'create book content',
    'edit own book content',
    'add content to books',
  ]);
  $this->adminUser = $this
    ->drupalCreateUser([
    'create new books',
    'create book content',
    'edit any book content',
    'delete any book content',
    'add content to books',
    'administer blocks',
    'administer permissions',
    'administer book outlines',
    'administer content types',
    'administer site configuration',
  ]);
}