function SecureSiteTest::testWhitelist in Secure Site 5
Same name and namespace in other branches
- 6 tests/securesite.test \SecureSiteTest::testWhitelist()
Test whitelist
File
- tests/
securesite.test, line 456 - Secure Site module unit tests
Class
- SecureSiteTest
- Unit tests for the Secure Site module
Code
function testWhitelist() {
$this
->drupalVariableSet('securesite_enabled', SECURESITE_AUTH);
$this
->drupalVariableSet('securesite_filter_pages_type', SECURESITE_WHITELIST);
$this
->drupalVariableSet('securesite_filter_pages', 'admin/*');
$this
->drupalGet(url('admin/content', NULL, NULL, TRUE));
$this
->assertResponse('403', t('Whitelist') . ': %s');
$this
->assertNoAuthentication();
$this
->assertText('Access denied');
}