protected function RequiredByRoleCommonWebTestCase::setFieldRequiredProperty in Required by role 7.2
Same name and namespace in other branches
- 7 tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test \RequiredByRoleCommonWebTestCase::setFieldRequiredProperty()
Helper function to set the required property.
3 calls to RequiredByRoleCommonWebTestCase::setFieldRequiredProperty()
- RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehavior in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Test changing the required property to the default behavior.
- RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehaviorNotRequired in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Test changing the required property to the default behavior and NOT required.
- RequiredByRoleCommonWebTestCase::DotestChangeToRequiredByRole in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Test changing the required property to required by role.
File
- tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test, line 141 - Tests for the common cases.
Class
- RequiredByRoleCommonWebTestCase
- @file Tests for the common cases.
Code
protected function setFieldRequiredProperty($settings) {
$node_type = $this->entity_bundle;
$url = "admin/structure/types/manage/" . $node_type . "/fields/" . $this
->getFieldMachineName();
$plugin = array();
$plugin['instance[settings][required_plugin]'] = $settings['instance[settings][required_plugin]'];
$this
->drupalPostAJAX($url, $plugin, 'instance[settings][required_plugin]');
$this
->drupalPost(NULL, $settings, t('Save settings'));
}