public function XMLSitemapUserFunctionalTest::setUp in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap_user/xmlsitemap_user.test \XMLSitemapUserFunctionalTest::setUp()
Setup.
Overrides XMLSitemapTestHelper::setUp
File
- xmlsitemap_user/
xmlsitemap_user.test, line 45 - Unit tests for the xmlsitemap_user module.
Class
- XMLSitemapUserFunctionalTest
- Tests for User Functional.
Code
public function setUp($modules = array()) {
$modules[] = 'xmlsitemap_user';
parent::setUp($modules);
// Save the user settings before creating the users.
xmlsitemap_link_bundle_settings_save('user', 'user', array(
'status' => 1,
'priority' => 0.5,
));
// Create the users.
$this->admin_user = $this
->drupalCreateUser(array(
'administer users',
'administer permissions',
'administer xmlsitemap',
));
$this->normal_user = $this
->drupalCreateUser(array(
'access content',
));
// Update the normal user to make its sitemap link visible.
$account = clone $this->normal_user;
user_save($account, array(
'access' => 1,
'login' => 1,
));
}