function MultifieldTableTest::setUp in Multifield table 7
Prepares the testing environment.
Overrides DrupalWebTestCase::setUp
File
- ./
multifield_table.test, line 15
Class
Code
function setUp() {
// Enable minimum required modules.
parent::setUp('multifield', 'multifield_table');
// Create user.
$this->privileged_user = $this
->drupalCreateUser(array(
'bypass node access',
'administer content types',
'administer multifield',
));
$this
->drupalLogin($this->privileged_user);
// Create content type, with underscores.
$type_name = strtolower($this
->randomName(8)) . '_test';
$type = $this
->drupalCreateContentType(array(
'name' => $type_name,
'type' => $type_name,
));
$this->type = $type->type;
// Store a valid URL name, with hyphens instead of underscores.
$this->hyphen_type = str_replace('_', '-', $this->type);
}