You are here

protected function BookAccessTestCase::resetTestData in Book access 7.2

1 call to BookAccessTestCase::resetTestData()
BookAccessTestCase::setUp in ./book_access_test_case.test
Sets up a Drupal site for running functional and integration tests.

File

./book_access_test_case.test, line 25

Class

BookAccessTestCase

Code

protected function resetTestData() {
  $this->author = $this
    ->drupalCreateUser(array(
    'administer access of own books',
    'add content to books',
    'create book content',
    'create new books',
    'edit own book content',
    'access content',
  ));
  $this->adminRole = $this
    ->drupalCreateRole(array(
    'administer nodes',
    'access content',
  ), 'administrator');

  // invoke the initialization manually
  module_invoke('book_access', 'init');
  $this->books = array();
  $this->nodes = array();
  $this
    ->createBook($this->books, $this->nodes, $this->author);
}