You are here

public function SiteStatusMessageTestCase::testPermission in Site Status Message 7

Test Site Status Message permissions.

File

tests/site_status_message.test, line 45
Tests for Site Status Message module.

Class

SiteStatusMessageTestCase
Class SiteStatusMessageTestCase.

Code

public function testPermission() {

  // Ensure permissions set in module are enabled.
  $data = module_invoke('site_status_message', 'permission');

  // Run checks on the permissions.
  $this
    ->assertTrue(is_array($data), 'Permission hook returns array.');
  $this
    ->assertEqual(1, count($data), 'Permission array has only one item.');
  $this
    ->assertTrue(array_key_exists('administer site status message', $data), 'Site Status Message Admin Permission is as expected.');
}