public function BookTest::testAdminBookListing in Drupal 9
Same name and namespace in other branches
- 8 core/modules/book/tests/src/Functional/BookTest.php \Drupal\Tests\book\Functional\BookTest::testAdminBookListing()
- 10 core/modules/book/tests/src/Functional/BookTest.php \Drupal\Tests\book\Functional\BookTest::testAdminBookListing()
Tests the administrative listing of all books.
File
- core/
modules/ book/ tests/ src/ Functional/ BookTest.php, line 615
Class
- BookTest
- Create a book, add pages, and test book interface.
Namespace
Drupal\Tests\book\FunctionalCode
public function testAdminBookListing() {
// Create a new book.
$nodes = $this
->createBook();
// Load the book page and assert the created book title is displayed.
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/structure/book');
$this
->assertSession()
->pageTextContains($this->book
->label());
}