You are here

public function RequiredByRoleUnitTestCase::testEmptyRoles in Required by role 7.2

Test empty roles.

File

tests/required_by_role_test/RequiredByRoleUnitTestCase.test, line 51
Unit test for the ByRole plugin.

Class

RequiredByRoleUnitTestCase
@file Unit test for the ByRole plugin.

Code

public function testEmptyRoles() {
  $contexts = array(
    'instance' => array(
      'settings' => array(
        'required_plugin_options' => array(),
      ),
    ),
    'account' => drupal_anonymous_user(),
  );
  $required = $this->plugin
    ->isRequired($contexts);
  $expected = FALSE;
  $this
    ->assertEqual($required, $expected);
}