You are here

function SecureSiteConfig403Test::testSecureSiteConfig403Page in Secure Site 8

Save previous access denied page.

File

src/Tests/ForcedAuth/SecureSiteConfig403Test.php, line 62
Contains Drupal\securesite\Tests\ForcedAuth\SecureSiteConfig403Test

Class

SecureSiteConfig403Test
Functional tests for configuring access denied page.

Namespace

Drupal\securesite\Tests\ForcedAuth

Code

function testSecureSiteConfig403Page() {
  $this
    ->drupalPostForm('admin/config/development/logging', array(
    'site_403' => 'site_403',
  ), 'Save configuration');
  $config = \Drupal::config('securesite.settings');
  $config
    ->set('securesite_enabled', SECURESITE_403)
    ->save();
  $this
    ->drupalPostForm('admin/config/development/logging', array(), 'Save configuration');
  $this
    ->assertTrue($config
    ->get('securesite_403') == 'site_403', t('Saving previous access denied page.'));
}