function CaptchaAdminTestCase::testAdminAccess in CAPTCHA 7
Same name and namespace in other branches
- 6.2 captcha.test \CaptchaAdminTestCase::testAdminAccess()
Test access to the admin pages.
File
- ./
captcha.test, line 417 - Tests for CAPTCHA module.
Class
Code
function testAdminAccess() {
$this
->drupalLogin($this->normal_user);
$this
->drupalGet(self::CAPTCHA_ADMIN_PATH);
$this
->assertText(t('Access denied'), 'Normal users should not be able to access the CAPTCHA admin pages', 'CAPTCHA');
$this
->drupalLogin($this->admin_user);
$this
->drupalGet(self::CAPTCHA_ADMIN_PATH);
$this
->assertNoText(t('Access denied'), 'Admin users should be able to access the CAPTCHA admin pages', 'CAPTCHA');
}