SecureSiteFormNoneTest.php in Secure Site 8
File
src/Tests/FormAuth/SecureSiteFormNoneTest.php
View source
<?php
namespace Drupal\securesite\Tests\FormAuth;
use Drupal\simpletest\WebTestBase;
class SecureSiteFormNoneTest extends WebTestBase {
public static $modules = array(
'securesite',
);
public static function getInfo() {
return array(
'name' => t('Form authentication: No credentials'),
'description' => t('Test HTML form authentication without credentials.'),
'group' => t('Secure Site'),
);
}
function setUp() {
parent::setUp();
$config = \Drupal::config('securesite.settings');
$config
->set('securesite_enabled', SECURESITE_ALWAYS);
$config
->set('securesite_type', array(
SECURESITE_FORM,
SECURESITE_BASIC,
SECURESITE_DIGEST,
));
$config
->save();
}
function testSecureSiteTypeFormNone() {
$this
->drupalGet(NULL);
$this
->assertFieldByXPath('//form[@id="securesite-user-login"]', '', t('Requesting home page without credentials.'));
}
}