mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 08:43:13 +08:00
Improved public API in ApiKey entity, reducing anemic model
This commit is contained in:
@@ -87,8 +87,7 @@ class ApiKeyServiceTest extends TestCase
|
||||
*/
|
||||
public function checkReturnsFalseWhenKeyIsExpired()
|
||||
{
|
||||
$key = new ApiKey();
|
||||
$key->setExpirationDate(Chronos::now()->subDay());
|
||||
$key = new ApiKey(Chronos::now()->subDay());
|
||||
$repo = $this->prophesize(EntityRepository::class);
|
||||
$repo->findOneBy(['key' => '12345'])->willReturn($key)
|
||||
->shouldBeCalledTimes(1);
|
||||
|
||||
Reference in New Issue
Block a user