You are here

bookblock.test in Book Block 7

Tests for the bookblock module.

File

bookblock.test
View source
<?php

/**
 * @file
 * Tests for the bookblock module.
 */
class BookblockBlockTestCase extends DrupalWebTestCase {
  public function getInfo() {
    return array(
      'name' => 'Bookblock module block functionality',
      'description' => 'Test blocks in the Bookblock module.',
      'group' => 'Bookblock',
    );
  }
  function setUp() {
    parent::setUp('block', 'book', 'bookblock');

    // Create users.
    // @todo What users do we need?
    // @todo What permissions do they need?
    // "administer site configuration" is currently the only permission needed by bookblock.
    $this->book_author = $this
      ->drupalCreateUser(array(
      'create new books',
      'create book content',
      'edit own book content',
      'add content to books',
    ));
    $this->web_user = $this
      ->drupalCreateUser(array(
      'access printer-friendly version',
    ));
    $this->admin_user = $this
      ->drupalCreateUser(array(
      'create new books',
      'create book content',
      'edit own book content',
      'add content to books',
      'administer blocks',
    ));
  }

}

Classes

Namesort descending Description
BookblockBlockTestCase @file Tests for the bookblock module.