function BotchaTestCase::testBotchaOnLoginBlockOnAdminPages in BOTCHA Spam Prevention 6
Same name and namespace in other branches
- 7 botcha.test \BotchaTestCase::testBotchaOnLoginBlockOnAdminPages()
BOTCHA should also be put on admin pages if visitor has no access
File
- ./
botcha.test, line 404 - Tests for BOTCHA module.
Class
Code
function testBotchaOnLoginBlockOnAdminPages() {
// Set a BOTCHA on login block form
botcha_set_form_id_setting('user_login_block', 'default');
// Check if there is a BOTCHA on home page.
$this
->drupalGet('node');
$this
->assertBotchaPresence(TRUE);
// Check there is a BOTCHA on "forbidden" admin pages
$this
->drupalGet('admin');
$this
->assertBotchaPresence(TRUE);
}