function ProfileBlockTestCase::setUp
Overrides ProfileTestCase::setUp
File
-
modules/
profile/ profile.test, line 396
Class
Code
function setUp() {
parent::setUp();
// Login the admin user.
$this->drupalLogin($this->admin_user);
// Create two fields.
$category = $this->randomName();
$this->field1 = $this->createProfileField('textfield', $category, array(
'weight' => 0,
));
$this->field2 = $this->createProfileField('textfield', $category, array(
'weight' => 1,
));
// Assign values to those fields.
$this->value1 = $this->setProfileField($this->field1);
$this->value2 = $this->setProfileField($this->field2);
// Create a node authored by the normal user.
$this->node = $this->drupalCreateNode(array(
'uid' => $this->normal_user->uid,
));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.