function BookContentModerationTest::setUp
Same name in other branches
- 9 core/modules/book/tests/src/Functional/BookContentModerationTest.php \Drupal\Tests\book\Functional\BookContentModerationTest::setUp()
- 8.9.x core/modules/book/tests/src/Functional/BookContentModerationTest.php \Drupal\Tests\book\Functional\BookContentModerationTest::setUp()
- 11.x core/modules/book/tests/src/Functional/BookContentModerationTest.php \Drupal\Tests\book\Functional\BookContentModerationTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ book/ tests/ src/ Functional/ BookContentModerationTest.php, line 41
Class
- BookContentModerationTest
- Tests Book and Content Moderation integration.
Namespace
Drupal\Tests\book\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->drupalPlaceBlock('system_breadcrumb_block');
$this->drupalPlaceBlock('page_title_block');
$workflow = $this->createEditorialWorkflow();
$workflow->getTypePlugin()
->addEntityTypeAndBundle('node', 'book');
$workflow->save();
// We need a user with additional content moderation permissions.
$this->bookAuthor = $this->drupalCreateUser([
'create new books',
'create book content',
'edit own book content',
'add content to books',
'access printer-friendly version',
'view any unpublished content',
'use editorial transition create_new_draft',
'use editorial transition publish',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.