You are here

public function SitemapBookTest::testBooksCustomTitle in Sitemap 8.2

Same name and namespace in other branches
  1. 2.0.x src/Tests/SitemapBookTest.php \Drupal\sitemap\Tests\SitemapBookTest::testBooksCustomTitle()

Tests a custom title setting for books.

File

src/Tests/SitemapBookTest.php, line 97

Class

SitemapBookTest
Test the display of books based on sitemap settings.

Namespace

Drupal\sitemap\Tests

Code

public function testBooksCustomTitle() {
  $bid = $this->book
    ->id();

  // Configure sitemap to show the test book.
  $this
    ->saveSitemapForm([
    'plugins[book:' . $bid . '][enabled]' => TRUE,
  ]);
  $this
    ->titleTest($this->book
    ->label(), 'book', $bid, TRUE);
}