function SecureSiteTest::testWhitelist in Secure Site 6
Same name and namespace in other branches
- 5 tests/securesite.test \SecureSiteTest::testWhitelist()
Test whitelist
File
- tests/
securesite.test, line 459 - 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', array(
'absolute' => TRUE,
)));
$this
->assertResponse('403', t('Whitelist') . ': %s');
$this
->assertNoAuthentication();
$this
->assertText('Access denied');
}