You are here

protected function RequiredByRoleCommonWebTestCase::checkFieldRequiredProperty in Required by role 7.2

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

Helper function check the settings.

3 calls to RequiredByRoleCommonWebTestCase::checkFieldRequiredProperty()
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 158
Tests for the common cases.

Class

RequiredByRoleCommonWebTestCase
@file Tests for the common cases.

Code

protected function checkFieldRequiredProperty($ids) {
  $node_type = $this->entity_bundle;
  $url = "admin/structure/types/manage/" . $node_type . "/fields/" . $this
    ->getFieldMachineName();
  $this
    ->drupalGet($url);
  foreach ($ids as $id => $active) {
    if ($active) {
      $this
        ->assertFieldChecked($id);
    }
    else {
      $this
        ->assertNoFieldChecked($id);
    }
  }
}