You are here

public function ReCaptchaBaseTestCase::setUp in reCAPTCHA 7

Set up some required modules and users.

Overrides DrupalWebTestCase::setUp

1 call to ReCaptchaBaseTestCase::setUp()
ReCaptchaServerStatusTestCase::setup in tests/recaptcha_server_status.test

File

tests/recaptcha_base.test, line 35
Contains ReCaptcha.

Class

ReCaptchaBaseTestCase
Test cases for ReCaptcha module UI.

Code

public function setUp() {
  parent::setUp('recaptcha');

  // Create a normal user.
  $permissions = array(
    'access comments',
    'post comments',
    'skip comment approval',
    'access content',
    'create page content',
    'edit own page content',
  );
  $this->normal_user = $this
    ->drupalCreateUser($permissions);

  // Create an admin user.
  $permissions[] = 'administer CAPTCHA settings';
  $permissions[] = 'skip CAPTCHA';
  $permissions[] = 'administer permissions';
  $permissions[] = 'administer content types';
  $permissions[] = 'administer recaptcha';
  $this->admin_user = $this
    ->drupalCreateUser($permissions);
}