You are here

function PublishContentWebCaseTest::assert_access_denied in Publish Content 6

Same name and namespace in other branches
  1. 5.2 tests/publishcontent.test \PublishContentWebCaseTest::assert_access_denied()
2 calls to PublishContentWebCaseTest::assert_access_denied()
PublishContentWebCaseTest::assert_current_user_cannot_publish_node in tests/publishcontent.test
PublishContentWebCaseTest::assert_current_user_cannot_unpublish_node in tests/publishcontent.test

File

tests/publishcontent.test, line 41
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);
  $this
    ->assertResponse(403);
  $this
    ->assertText('Access denied' . ' | ' . variable_get('site_name', 'Drupal'), $msg);
}