You are here

protected function ReCaptchaBasicTest::setUp in reCAPTCHA 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ReCaptchaBasicTest.php \Drupal\Tests\recaptcha\Functional\ReCaptchaBasicTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/ReCaptchaBasicTest.php, line 45

Class

ReCaptchaBasicTest
Test basic functionality of reCAPTCHA module.

Namespace

Drupal\Tests\recaptcha\Functional

Code

protected function setUp() {
  parent::setUp();
  module_load_include('inc', 'captcha');

  // Create a normal user.
  $permissions = [
    'access content',
  ];
  $this->normalUser = $this
    ->drupalCreateUser($permissions);

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