Index: modules/book/book.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.test,v
retrieving revision 1.7
diff -r1.7 book.test
78a79,84
> 
>     // Check that we can add a new child page by clicking
>     // the 'Add child page' link on a page.
>     $this->drupalLogout();
>     $this->drupalLogin($book_author);
>     $this->checkAddChildPage($node, $this->book);
173a180,204
> 
>   function checkAddChildPage($parent, $book) {
>     $child_type = variable_get('book_child_type', 'book');
>     $this->drupalGet('node/' . $parent->nid);
> 
>     // Check to make sure the 'Add child page' link exists
>     $this->assertRaw(l('Add child page', 'node/add/' . $child_type, array('query' => 'parent=' . $parent->book['mlid'])), t('Add child page link exists'));
>     $this->clickLink('Add child page');
> 
>     // Check that the parent page is set correctly on the node/add/% page
>     $this->assertFieldByName('book[plid]', $parent->book['mlid']);
> 
>     $edit = array(
>       'title' => $this->randomName(10),
>       'body'  => $this->randomName(64),
>     );
>     $this->drupalPost(NULL, $edit, t('Save'));
> 
>     // Check to make sure the book node was created
>     $this->drupalGetNodeByTitle($edit['title']);
> 
>     // Make sure we can get back to our parent
>     $this->assertRaw(l('‹ ' . $parent->title, 'node/' . $parent->nid, array('attributes' => array('class' => 'page-previous', 'title' => t('Go to previous page')))), t('Parent page link found.'));
>     return;
>   }
