Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MockArraySessionStorage.php

function MockArraySessionStorage::generateId

Generates a session ID.

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

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 170

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

protected function generateId() : string {
    return bin2hex(random_bytes(16));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal