function PublishContentWebCaseTest::assert_access_denied in Publish Content 5.2
Same name and namespace in other branches
- 6 tests/publishcontent.test \PublishContentWebCaseTest::assert_access_denied()
1 call to PublishContentWebCaseTest::assert_access_denied()
File
- tests/
publishcontent.test, line 43 - Unit tests for Publish Content module. prerequesite: make sure that 'authenticated user' does not have any access like 'publish [content type] content' or 'unpublish [content type] content'
Class
- PublishContentWebCaseTest
- @file Unit tests for Publish Content module. prerequesite: make sure that 'authenticated user' does not have any access like 'publish [content type] content' or 'unpublish [content type] content'
Code
function assert_access_denied($url, $msg = NULL) {
$this
->drupalGet(url($url, NULL, NULL, TRUE));
$this
->assertResponse(403);
$this
->assertText('Access denied' . ' | ' . variable_get('site_name', 'Drupal'), $msg);
}