You are here

public function RequiredByRoleCommonWebTestCase::DotestChangeToRequiredByRole in Required by role 7

Same name and namespace in other branches
  1. 7.2 tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test \RequiredByRoleCommonWebTestCase::DotestChangeToRequiredByRole()

Test changing the required property to required by role.

1 call to RequiredByRoleCommonWebTestCase::DotestChangeToRequiredByRole()
RequiredByRoleCommonWebTestCase::testCommonBehaviors in tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test
Group the tests for better performance.

File

tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test, line 279
Tests for the common cases.

Class

RequiredByRoleCommonWebTestCase
@file Tests for the common cases.

Code

public function DotestChangeToRequiredByRole() {
  $rid = (int) $this->required_fields_rid;
  $settings = array(
    "instance[required]" => FALSE,
    "instance[settings][required_by_role][{$rid}]" => $rid,
  );
  $this
    ->setFieldRequiredProperty($settings);
  $ids = array(
    'edit-instance-settings-required-by-role-' . $rid => 1,
    'edit-instance-required' => 0,
  );
  $this
    ->checkFieldRequiredProperty($ids);
}