You are here

public function SimplesamlphpAuthManagerTest::testIsAuthenticated in simpleSAMLphp Authentication 8.3

Tests isAuthenticated() method.

@covers ::__construct @covers ::isAuthenticated

File

tests/src/Unit/Service/SimplesamlphpAuthManagerTest.php, line 193

Class

SimplesamlphpAuthManagerTest
SimplesamlphpAuthManager unit tests.

Namespace

Drupal\Tests\simplesamlphp_auth\Unit\Service

Code

public function testIsAuthenticated() {

  // Set expectations for instance.
  $this->instance
    ->expects($this
    ->once())
    ->method('isAuthenticated')
    ->will($this
    ->returnValue(TRUE));

  // Test isAuthenticated() method.
  $simplesaml = $this
    ->getManagerInContext();
  $return = $simplesaml
    ->isAuthenticated();
  $this
    ->assertTrue($return);
}