function BookBreadcrumbTest::setUp

Same name in other branches
  1. 8.9.x core/modules/book/tests/src/Functional/BookBreadcrumbTest.php \Drupal\Tests\book\Functional\BookBreadcrumbTest::setUp()
  2. 10 core/modules/book/tests/src/Functional/BookBreadcrumbTest.php \Drupal\Tests\book\Functional\BookBreadcrumbTest::setUp()
  3. 11.x 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',
    ]);
}

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