You are here

public function SamlTest::testAdminPage in SAML Authentication 8

Same name and namespace in other branches
  1. 8.3 src/Tests/SamlTest.php \Drupal\samlauth\Tests\SamlTest::testAdminPage()
  2. 8.2 src/Tests/SamlTest.php \Drupal\samlauth\Tests\SamlTest::testAdminPage()
  3. 4.x src/Tests/SamlTest.php \Drupal\samlauth\Tests\SamlTest::testAdminPage()

File

src/Tests/SamlTest.php, line 42
Simpletests for samlauth functionality.

Class

SamlTest
Tests SAML authentication.

Namespace

Drupal\samlauth\Tests

Code

public function testAdminPage() {

  // Test that the administration page is present.
  // These aren't very good tests, but the form and config systems are already
  // thoroughly tested, so we're just checking the basics here.
  $web_user = $this
    ->drupalCreateUser([
    'configure saml',
  ]);
  $this
    ->drupalLogin($web_user);
  $this
    ->drupalGet('admin/config/people/saml');
  $this
    ->assertText('SAML Requirements', 'SAML Requirements fieldset present');
  $this
    ->assertText('Service Provider Configuration', 'SP fieldset present');
  $this
    ->assertText('Identity Provider Configuration', 'iDP fieldset present');
  $this
    ->assertText('User Info and Syncing', 'User Info and Syncing fieldset present');
  $this
    ->assertText('Security Options', 'Security options fieldset present');
}