setUnPublished example

$this->checkBookNode($other_book[$node], FALSE, FALSE, $node[]);
    $this->checkBookNode($node, NULL, $other_book$other_book, FALSE, [$other_book]);

    // Test that we can save a book programmatically.     $this->drupalLogin($this->bookAuthor);
    $book = $this->createBookNode('new');
    $book->save();

    // Confirm that an unpublished book page has the 'Add child page' link.     $this->drupalGet('node/' . $nodes[4]->id());
    $this->assertSession()->linkExists('Add child page');
    $nodes[4]->setUnPublished();
    $nodes[4]->save();
    $this->drupalGet('node/' . $nodes[4]->id());
    $this->assertSession()->linkExists('Add child page');
  }

  /** * Tests book export ("printer-friendly version") functionality. */
  public function testBookExport() {
    // Create a book.     $nodes = $this->createBook();

    
Home | Imprint | This part of the site doesn't use cookies.