You are here

function SecureSiteConfig403Test::testSecureSiteConfig403ResetCurrent in Secure Site 8

Keep current access denied page when no previous setting exists.

File

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

Class

SecureSiteConfig403Test
Functional tests for configuring access denied page.

Namespace

Drupal\securesite\Tests\ForcedAuth

Code

function testSecureSiteConfig403ResetCurrent() {
  \Drupal::config('system.site')
    ->set('page.403', 'site_403')
    ->save();
  $this
    ->drupalPostForm('admin/config/securesite', array(), 'Reset to defaults');
  $this
    ->assertTrue(\Drupal::config('system.site')
    ->get('page.403') == 'site_403', t('Keeping current access denied page when no previous setting exists.'));
}