function UserSessionTest::testGetLastAccessedTime

Tests that ::getLastAccessedTime() returns an integer.

@legacy-covers ::getLastAccessedTime

File

core/tests/Drupal/Tests/Core/Session/UserSessionTest.php, line 90

Class

UserSessionTest
Tests Drupal\Core\Session\UserSession.

Namespace

Drupal\Tests\Core\Session

Code

public function testGetLastAccessedTime() : void {
  $user = new UserSession([
    'access' => '1234567890',
  ]);
  $this->assertSame(1234567890, $user->getLastAccessedTime());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.