private function BookAccessTestCase::caseDeletingBookDoesNotDeleteGrants in Book access 7.2
1 call to BookAccessTestCase::caseDeletingBookDoesNotDeleteGrants()
File
- ./
book_access_test_case.test, line 486
Class
Code
private function caseDeletingBookDoesNotDeleteGrants() {
$roleBooks = array();
$roleNodes = array();
$this
->createBook($roleBooks, $roleNodes, $this->author);
$this
->assertTrue(BookAccess::checkGrant($roleBooks[0]->nid, 'grant_view', $this->author), t('Sanity checking that newly-created book has grant_view'));
$this
->assertTrue(BookAccess::checkGrant($this->books[0]->nid, 'grant_view', $this->author), t('Sanity checking that base test-case book has grant_view'));
node_delete($roleBooks[0]->nid);
$this
->assertTrue(BookAccess::checkGrant($this->books[0]->nid, 'grant_view', $this->author), t('Base test-case book should maintain its permissions'));
}