public function SearchByPageAttachTest::setUpUsers in Search by Page 7
Sets up superuser and low-privilege user.
4 calls to SearchByPageAttachTest::setUpUsers()
- SearchbyPageAttach2Test::setUp in tests/
search_by_page.test - Sets up a Drupal site for running functional and integration tests.
- SearchbyPageAttachNotReadable::setUp in tests/
search_by_page.test - Sets up a Drupal site for running functional and integration tests.
- SearchbyPageAttachReindexTest::setUp in tests/
search_by_page.test - Sets up a Drupal site for running functional and integration tests.
- SearchByPageAttachTest::setUp in tests/
search_by_page.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
search_by_page.test, line 2215 - Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com
Class
- SearchByPageAttachTest
- Functionality test 1 for Search by Page Attachments.
Code
public function setUpUsers($env) {
$this->superuser = $this
->drupalCreateUser(array(
'administer nodes',
'access content',
'administer content types',
'administer blocks',
'administer search',
'search content',
'administer search by page',
'access administration pages',
$this
->searchPerm($env),
'administer site configuration',
'administer users',
'administer permissions',
'view test private content',
'administer search_files configuration',
'access site reports',
));
$this->noprivuser = $this
->drupalCreateUser(array(
$this
->searchPerm($env),
'search content',
));
// Clear default permissions for authenticated users.
db_delete('role_permission')
->condition('rid', DRUPAL_AUTHENTICATED_RID)
->execute();
$this
->assertFalse(user_access('access content', $this->noprivuser), 'No priv user cannot access content');
$this
->drupalLogin($this->superuser);
}