protected function RequiredByRoleCommonWebTestCase::setUp in Required by role 7.2
Same name and namespace in other branches
- 7 tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test \RequiredByRoleCommonWebTestCase::setUp()
Setup method.
Overrides RequiredByRoleBasic::setUp
File
- tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test, line 33 - Tests for the common cases.
Class
- RequiredByRoleCommonWebTestCase
- @file Tests for the common cases.
Code
protected function setUp() {
parent::setUp('field', 'field_ui', 'required_by_role');
$rid = (int) $this->required_fields_rid;
$settings = array(
"instance[settings][required_plugin]" => "by_role",
"instance[settings][required_plugin_options][{$rid}]" => $rid,
);
$this
->drupalLogin($this
->getRequiredUser());
$this
->setFieldLabel($this
->randomName(4));
$this
->setFieldName('text_test');
$this
->createTextField(NULL, $settings);
}