function BookBreadcrumbTest::setUp

Same name in other branches
  1. 9 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() {
    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',
    ]);
}

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