for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SocialConnect project
* @author: Patsura Dmitry https://github.com/ovr <[email protected]>
*/
declare(strict_types=1);
namespace SocialConnect\Provider\Session;
* You are not interested to use native PHP sessions and would like to mock without mocking in PHPUnit
class Dummy implements SessionInterface
{
protected $storage = [];
* @param string $key
*
* @return mixed
public function get($key)
if (isset($this->storage[$key])) {
return $this->storage[$key];
}
return null;
* @param mixed $value
public function set($key, $value)
$this->storage[$key] = $value;
public function delete($key)
unset($this->storage[$key]);