protected function RequiredByRoleBasic::setUp in Required by role 7
Same name and namespace in other branches
- 7.2 tests/required_by_role_test/RequiredByRoleBasic.test \RequiredByRoleBasic::setUp()
Setup method.
Overrides DrupalWebTestCase::setUp
4 calls to RequiredByRoleBasic::setUp()
- RequiredByRoleCommonWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Setup method.
- RequiredByRoleDateFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleDateFieldWebTestCase.test - Setup method.
- RequiredByRoleEmailFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleEmailFieldWebTestCase.test - Setup method.
- RequiredByRoleImageFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleImageFieldWebTestCase.test - Setup method.
4 methods override RequiredByRoleBasic::setUp()
- RequiredByRoleCommonWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleCommonWebTestCase.test - Setup method.
- RequiredByRoleDateFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleDateFieldWebTestCase.test - Setup method.
- RequiredByRoleEmailFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleEmailFieldWebTestCase.test - Setup method.
- RequiredByRoleImageFieldWebTestCase::setUp in tests/
required_by_role_test/ RequiredByRoleImageFieldWebTestCase.test - Setup method.
File
- tests/
required_by_role_test/ RequiredByRoleBasic.test, line 24 - Tests for Required by role module.
Class
- RequiredByRoleBasic
- Base class for all required by role web test cases.
Code
protected function setUp() {
parent::setUp('field_ui', 'required_by_role_test');
$this->basePermissions = array(
'access content',
'create ' . $this->entity_bundle . ' content',
'edit any ' . $this->entity_bundle . ' content',
'administer content types',
'administer nodes',
'administer filters',
'access comments',
'post comments',
'access administration pages',
);
// Create Basic page and Article node types.
if ($this->profile != 'standard') {
$this
->drupalCreateContentType(array(
'type' => $this->entity_bundle,
'name' => 'Article',
));
}
module_load_include('inc', 'field', 'field.crud');
module_load_include('inc', 'node', 'node.pages');
// Create a role for required fields.
$this->required_fields_rid = $this
->drupalCreateRole($this->basePermissions, 'Required fields role');
}