protected function PropertiesTemplateBaseTestCase::loginAdmin in Dynamic properties 7
Log in with administrative permissions.
Admin user is created on-demand.
Overrides PropertiesBaseTestCase::loginAdmin
3 calls to PropertiesTemplateBaseTestCase::loginAdmin()
- PropertiesTemplateTestCase::testAdministration in properties_template/
properties_template.test - Creates two different categories, adds them to a template and checks if the data is correctly displayed and stored.
- PropertiesTemplateTestCase::testExportAsTemplate in properties_template/
properties_template.test - Test for exporting a content as template.
- PropertiesTemplateTestCase::testPropertyFieldCreation in properties_template/
properties_template.test - Create a content based on a template.
File
- properties_template/
properties_template.test, line 31 - Contains tests for the properties_template.module
Class
- PropertiesTemplateBaseTestCase
- Base class for properties tests, provides helper methods.
Code
protected function loginAdmin() {
if (empty($this->admin)) {
$this->admin = $this
->drupalCreateUser(array(
'administer nodes',
'administer content types',
'create page content',
'edit any page content',
'administer properties attributes',
'administer properties categories',
'add properties attributes',
'add properties categories',
'administer properties templates',
'add properties templates',
));
}
$this
->drupalLogin($this->admin);
}