You are here

protected function MockArraySessionStorage::generateId in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\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 vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
Regenerates id that represents this storage.
MockArraySessionStorage::start in vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php
Starts the session.
MockFileSessionStorage::start in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Starts the session.

File

vendor/symfony/http-foundation/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 hash('sha256', uniqid('ss_mock_', true));
}