/**
* Creates a new book with a page hierarchy.
*
* @return \Drupal\node\NodeInterface[]
* The created book nodes.
*/ protectedfunctioncreateBreadcrumbBook(){ // Create new book.
$this->drupalLogin($this->bookAuthor);
/**
* Tests saving the book outline on an empty book.
*/ publicfunctiontestEmptyBook(){ // Create a new empty book.
$this->drupalLogin($this->bookAuthor); $book = $this->createBookNode('new'); $this->drupalLogout();
// Log in as a user with access to the book outline and save the form.
$this->drupalLogin($this->adminUser); $this->drupalGet('admin/structure/book/' . $book->id()); $this->submitForm([], 'Save book pages'); $this->assertSession()->pageTextContains('Updated book ' . $book->label() . '.'); }
/**
* Tests book functionality through node interfaces.
*/