protected function MockArraySessionStorage::generateId

Generates a session ID.

This doesn't need to be particularly cryptographically secure since this is just a mock.

Return value

string

3 calls to MockArraySessionStorage::generateId()
MockArraySessionStorage::regenerate in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
Regenerates id that represents this storage.
MockArraySessionStorage::start in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
Starts the session.
MockFileSessionStorage::start in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php
Starts the session.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php, line 250

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

protected function generateId() {
  return sha1(uniqid(mt_rand()));
}