function MockArraySessionStorage::getBag
Overrides SessionStorageInterface::getBag
File
-
vendor/
symfony/ http-foundation/ Session/ Storage/ MockArraySessionStorage.php, line 133
Class
- MockArraySessionStorage
- MockArraySessionStorage mocks the session for unit tests.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function getBag(string $name) : SessionBagInterface {
if (!isset($this->bags[$name])) {
throw new \InvalidArgumentException(\sprintf('The SessionBagInterface "%s" is not registered.', $name));
}
if (!$this->started) {
$this->start();
}
return $this->bags[$name];
}