2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
// Check that the nodes in the second book are displayed correctly.
// First we must set $this->book to the second book, so that the
...
...
@@ -194,6 +211,40 @@ class BookTestCase extends DrupalWebTestCase {
return$node;
}
/**
* Tests book export ("printer-friendly version") functionality.
*/
functiontestBookExport(){
// Create a book.
$nodes=$this->createBook();
// Login as web user and view printer-friendly version.
$this->drupalLogin($this->web_user);
$this->drupalGet('node/'.$this->book->nid);
$this->clickLink(t('Printer-friendly version'));
// Make sure each part of the book is there.
foreach($nodesas$node){
$this->assertText($node->title,t('Node title found in printer friendly version.'));
$this->assertRaw(check_markup($node->body[LANGUAGE_NONE][0]['value'],$node->body[LANGUAGE_NONE][0]['format']),t('Node body found in printer friendly version.'));
}
// Make sure we can't export an unsupported format.