You are here

public function SamlTest::testMetadata in SAML Authentication 4.x

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

Tests metadata coming back.

File

src/Tests/SamlTest.php, line 82

Class

SamlTest
Semi random tests for the samlauth module.

Namespace

Drupal\samlauth\Tests

Code

public function testMetadata() {
  $web_user = $this
    ->drupalCreateUser([
    'view sp metadata',
  ]);
  $this
    ->drupalLogin($web_user);

  // Test that we get metadata.
  $this
    ->drupalGet('saml/metadata');
  $this
    ->assertResponse(200, 'SP metadata is accessible');
  $this
    ->assertRaw('entityID="samlauth"', 'Entity ID found in the metadata');
}