You are here

private function BookAccessTestCase::caseNoSpecialBookAccess in Book access 7.2

1 call to BookAccessTestCase::caseNoSpecialBookAccess()
BookAccessTestCase::testCases in ./book_access_test_case.test

File

./book_access_test_case.test, line 101

Class

BookAccessTestCase

Code

private function caseNoSpecialBookAccess() {
  $user = $this
    ->drupalCreateUser(array(
    'access content',
  ));
  $this
    ->drupalLogin($user);
  foreach ($this->nodes as $node) {
    $nid = $node->nid;
    $this
      ->drupalGet("node/{$nid}");
    $this
      ->assertResponse('200', t('Can access content'));
    $this
      ->drupalGet("book_access/delete/user_permission/{$nid}/{$this->author->uid}");
    $this
      ->assertResponse('403', t('Cannot modify book_access permissions'));
    $this
      ->drupalGet("node/{$nid}/book_access");
    $this
      ->assertResponse('403', t('Cannot change book access'));
  }
  $this
    ->drupalLogout();
}