protected function BookContentModerationTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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 38
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',
]);
}