public function MockArraySessionStorage::save

Force the session to be saved and closed.

This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it it should actually persist the session data if required.

Overrides SessionStorageInterface::save

1 method overrides MockArraySessionStorage::save()
MockFileSessionStorage::save in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php
Force the session to be saved and closed.

File

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

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function save() {

  // nothing to do since we don't persist the session data
  $this->closed = false;
}