From 0b0890f425ced27b2204a046296de4cccdac4eb8 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 16 Sep 2018 14:08:09 +0200 Subject: Session: Added DatabaseHandler, replaces Symfony PdoSessionHandler --- .../Http/SessionHandlers/Stub/ArrayHandler.php | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tests/Unit/Http/SessionHandlers/Stub/ArrayHandler.php (limited to 'tests/Unit/Http/SessionHandlers/Stub/ArrayHandler.php') diff --git a/tests/Unit/Http/SessionHandlers/Stub/ArrayHandler.php b/tests/Unit/Http/SessionHandlers/Stub/ArrayHandler.php new file mode 100644 index 00000000..4d37da48 --- /dev/null +++ b/tests/Unit/Http/SessionHandlers/Stub/ArrayHandler.php @@ -0,0 +1,59 @@ +content[$id])) { + return $this->content[$id]; + } + + return ''; + } + + /** + * {@inheritdoc} + */ + public function write($id, $data): bool + { + $this->content[$id] = $data; + + return true; + } + + /** + * {@inheritdoc} + */ + public function destroy($id): bool + { + unset($this->content[$id]); + + return true; + } + + /** + * @return string + */ + public function getName(): string + { + return $this->name; + } + + /** + * @return string + */ + public function getSessionPath(): string + { + return $this->sessionPath; + } +} -- cgit v1.2.3-54-g00ecf