diff --git a/core/lib/Drupal/Core/Form/BaseFormIdInterface.php b/core/lib/Drupal/Core/Form/BaseFormIdInterface.php index f948aac..3576758 100644 --- a/core/lib/Drupal/Core/Form/BaseFormIdInterface.php +++ b/core/lib/Drupal/Core/Form/BaseFormIdInterface.php @@ -18,8 +18,8 @@ /** * Returns a string identifying the base form. * - * @return string|false - * The string identifying the base form or FALSE if this is not a base form. + * @return string|null + * The string identifying the base form or NULL if this is not a base form. */ public function getBaseFormID(); diff --git a/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php b/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php index d0960f4..94d9b8a 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookOutlineForm.php @@ -7,14 +7,14 @@ namespace Drupal\book\Form; -use Drupal\Core\Entity\EntityFormControllerNG; +use Drupal\Core\Entity\ContentEntityFormController; use Drupal\book\BookManager; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Displays the book outline form. */ -class BookOutlineForm extends EntityFormControllerNG { +class BookOutlineForm extends ContentEntityFormController { /** * The book being displayed. @@ -51,7 +51,7 @@ public static function create(ContainerInterface $container) { * {@inheritdoc} */ public function getBaseFormID() { - return FALSE; + return NULL; } /** diff --git a/core/modules/book/lib/Drupal/book/Tests/BookTest.php b/core/modules/book/lib/Drupal/book/Tests/BookTest.php index 4772dfa..388c476 100644 --- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php +++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php @@ -509,4 +509,17 @@ public function testBookOrdering() { $this->assertFieldByName("table[book-admin-{$node2->id()}][weight]", 2); $this->assertFieldByName("table[book-admin-{$node2->id()}][plid]", $plid); } + + /** + * Test outline of a book. + */ + public function testBookOutline() { + // Create new book. + $this->drupalLogin($this->book_author); + $book = $this->createBookNode('new'); + + $this->drupalLogin($this->admin_user); + $this->drupalGet('node/' . $book->id() . '/outline'); + $this->assertRaw(t('Book outline')); + } }