function SecureSiteTest::testBlacklist in Secure Site 6
Same name and namespace in other branches
- 5 tests/securesite.test \SecureSiteTest::testBlacklist()
Test blacklist
File
- tests/
securesite.test, line 472 - Secure Site module unit tests
Class
- SecureSiteTest
- Unit tests for the Secure Site module
Code
function testBlacklist() {
$this
->drupalVariableSet('securesite_enabled', SECURESITE_AUTH);
$this
->drupalVariableSet('securesite_filter_pages_type', SECURESITE_BLACKLIST);
$this
->drupalVariableSet('securesite_filter_pages', 'admin/*');
$this
->drupalGet(url('admin/content', array(
'absolute' => TRUE,
)));
$this
->assertResponse('401', t('Blacklist') . ': %s');
$this
->assertAuthentication('Basic');
$this
->assertRealm(variable_get('securesite_realm', variable_get('site_name', 'Drupal')));
}