You are here

private function SecuritytxtModuleEnabledTestCase::checkSecurityTxtSigFile in Security.txt 7

Check security.txt.sig file.

Check the existance and content of .well-known/security.txt.sig according to whether the security.txt file is enabled or not.

2 calls to SecuritytxtModuleEnabledTestCase::checkSecurityTxtSigFile()
SecuritytxtModuleEnabledTestCase::testConfigureForm in ./securitytxt.test
Test configure form.
SecuritytxtModuleEnabledTestCase::testPageAccess in ./securitytxt.test
Test page access for various users.

File

./securitytxt.test, line 471
Tests for securitytxt.module.

Class

SecuritytxtModuleEnabledTestCase
Test case with the Security.txt module enabled.

Code

private function checkSecurityTxtSigFile($enabled, $signature_text) {
  $this
    ->drupalGet(self::SECURITY_TXT_SIG_PATH);
  if ($enabled) {
    $this
      ->assertResponse(200);
    $this
      ->assertText($signature_text);
  }
  else {
    $this
      ->assertResponse(404);
  }
}