You are here

protected function RequiredByRoleCommonWebTestCase::setUp in Required by role 7

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

Setup method.

Overrides RequiredByRoleBasic::setUp

File

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

Class

RequiredByRoleCommonWebTestCase
@file Tests for the common cases.

Code

protected function setUp() {
  parent::setUp();
  $rid = (int) $this->required_fields_rid;
  $settings = array(
    "instance[settings][required_by_role][{$rid}]" => $rid,
  );
  $this
    ->drupalLogin($this
    ->getRequiredUser());
  $this
    ->setFieldLabel($this
    ->randomName(4));
  $this
    ->setFieldName('text_test');
  $this
    ->createTextField(NULL, $settings);
  $this
    ->createOptionsField();
}