Skip to content
Snippets Groups Projects
Commit d4ac8181 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2250325 by jhodgdon, azinck, splatio: Fixed Route book.render (path...

Issue #2250325 by jhodgdon, azinck, splatio: Fixed Route book.render (path /book) does not seem to work.
parent ed310e10
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ public function adminOverview() {
public function bookRender() {
$book_list = array();
foreach ($this->bookManager->getAllBooks() as $book) {
$book_list[] = l($book['title'], $book['href'], $book['options']);
$book_list[] = l($book['title'], $book['link_path']);
}
return array(
'#theme' => 'item_list',
......
......@@ -605,4 +605,19 @@ public function testSaveBookLink() {
$this->assertEqual($return, $link);
}
/**
* Tests the listing of all books.
*/
public function testBookListing() {
// Create a new book.
$this->createBook();
// Must be a user with 'node test view' permission since node_access_test is enabled.
$this->drupalLogin($this->web_user);
// Load the book page and assert the created book title is displayed.
$this->drupalGet('book');
$this->assertText($this->book->label(), 'The book title is displayed on the book listing page.');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment