You are here

public function ReCaptchaBasicTest::testReCaptchaAdminAccess in reCAPTCHA 8.2

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

Test access to the administration page.

File

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

Class

ReCaptchaBasicTest
Test basic functionality of reCAPTCHA module.

Namespace

Drupal\Tests\recaptcha\Functional

Code

public function testReCaptchaAdminAccess() {
  $this
    ->drupalLogin($this->adminUser);
  $this
    ->drupalGet('admin/config/people/captcha/recaptcha');
  $this
    ->assertSession()
    ->pageTextNotContains($this
    ->t('Access denied'), 'Admin users should be able to access the reCAPTCHA admin page', 'reCAPTCHA');
  $this
    ->drupalLogout();
}