function BookRelationshipTest::setUp

Same name in other branches
  1. 9 core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php \Drupal\Tests\book\Functional\Views\BookRelationshipTest::setUp()
  2. 8.9.x core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php \Drupal\Tests\book\Functional\Views\BookRelationshipTest::setUp()
  3. 10 core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php \Drupal\Tests\book\Functional\Views\BookRelationshipTest::setUp()

Overrides ViewTestBase::setUp

File

core/modules/book/tests/src/Functional/Views/BookRelationshipTest.php, line 55

Class

BookRelationshipTest
Tests entity reference relationship data.

Namespace

Drupal\Tests\book\Functional\Views

Code

protected function setUp($import_test_views = TRUE, $modules = []) : void {
    parent::setUp($import_test_views, $modules);
    // Create users.
    $this->bookAuthor = $this->drupalCreateUser([
        'create new books',
        'create book content',
        'edit own book content',
        'add content to books',
    ]);
    ViewTestData::createTestViews(static::class, [
        'book_test_views',
    ]);
}

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