mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Updated API test fixtures to include API keys with roles
This commit is contained in:
@@ -45,6 +45,14 @@ class ApiKey extends AbstractEntity
|
||||
return $apiKey;
|
||||
}
|
||||
|
||||
public static function withKey(string $key, ?Chronos $expirationDate = null): self
|
||||
{
|
||||
$apiKey = new self($expirationDate);
|
||||
$apiKey->key = $key;
|
||||
|
||||
return $apiKey;
|
||||
}
|
||||
|
||||
public function getExpirationDate(): ?Chronos
|
||||
{
|
||||
return $this->expirationDate;
|
||||
|
||||
Reference in New Issue
Block a user