'view any unpublished content',
'use editorial transition create_new_draft',
'use editorial transition publish',
]);
} /**
* Tests that book drafts can not modify the book outline.
*/
public function testBookWithPendingRevisions() { // Create two books.
$book_1_nodes =
$this->
createBook(['moderation_state[0][state]' => 'published'
]);
$book_1 =
$this->book;
$this->
createBook(['moderation_state[0][state]' => 'published'
]);
$book_2 =
$this->book;
$this->
drupalLogin($this->bookAuthor
);
// Check that book pages display along with the correct outlines.
$this->book =
$book_1;
$this->
checkBookNode($book_1,
[$book_1_nodes[0
],
$book_1_nodes[3
],
$book_1_nodes[4
]], FALSE, FALSE,
$book_1_nodes[0
],
[]);
$this->
checkBookNode($book_1_nodes[0
],
[$book_1_nodes[1
],
$book_1_nodes[2
]],
$book_1,
$book_1,
$book_1_nodes[1
],
[$book_1]);