public function RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehavior in Required by role 7
Same name and namespace in other branches
- 7.2 tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test \RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehavior()
Test changing the required property to the default behavior.
1 call to RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehavior()
- 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 257 - Tests for the common cases.
Class
- RequiredByRoleCommonWebTestCase
- @file Tests for the common cases.
Code
public function DotestChangeToDefaultBehavior() {
$rid = (int) $this->required_fields_rid;
$settings = array(
"instance[required]" => 1,
"instance[settings][required_by_role][{$rid}]" => FALSE,
);
$this
->setFieldRequiredProperty($settings);
$ids = array(
'edit-instance-required' => 1,
'edit-instance-settings-required-by-role-' . $rid => 0,
);
$this
->checkFieldRequiredProperty($ids);
}