You are here

function RequiredByRoleImageFieldWebTestCase::setUp in Required by role 7

Setup method.

Overrides RequiredByRoleBasic::setUp

File

tests/required_by_role_test/RequiredByRoleImageFieldWebTestCase.test, line 19
Tests for the Image field.

Class

RequiredByRoleImageFieldWebTestCase
@file Tests for the Image field.

Code

function setUp() {
  parent::setUp('image');
  $rid = $this->required_fields_rid;
  $instance = field_info_instance('node', 'field_image', 'article');
  $instance['settings']['required_by_role'] = array(
    1 => 0,
    3 => 0,
    $rid => $rid,
    5 => 0,
  );
  field_update_instance($instance);
}