protected function RequiredByRoleCommonWebTestCase::checkFieldRequiredProperty in Required by role 7
Same name and namespace in other branches
- 7.2 tests/required_by_role_test/RequiredByRoleCommonWebTestCase.test \RequiredByRoleCommonWebTestCase::checkFieldRequiredProperty()
Helper function check the settings.
2 calls to RequiredByRoleCommonWebTestCase::checkFieldRequiredProperty()
- RequiredByRoleCommonWebTestCase::DotestChangeToDefaultBehavior in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Test changing the required property to the default behavior.
- 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 175 - 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);
}
}
}