This commit is contained in:
2022-01-13 18:41:03 +01:00
commit 0fb9f639da
159 changed files with 13183 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php declare(strict_types = 1);
namespace Tests\Toolkit\Nette;
use Nette\Security\IIdentity;
use Nette\Security\UserStorage;
final class DummyUserStorage implements UserStorage
{
/** @var IIdentity|NULL */
private $identity;
public function saveAuthentication(IIdentity $identity): void
{
$this->identity = $identity;
}
public function clearAuthentication(bool $clearIdentity): void
{
$this->identity = null;
}
public function getState(): array
{
return [$this->identity !== null, $this->identity, null];
}
public function setExpiration(?string $expire, bool $clearIdentity): void
{
}
public function setNamespace(string $namespace): self
{
return $this;
}
}