<?php

namespace App\Tests\Entity;

use App\Entity\Account;
use App\Entity\AccountResetPasswordRequest;
use PHPUnit\Framework\TestCase;

class AccountResetPasswordRequestTest extends TestCase
{
    public function testGettersAndSetters()
    {
        $request = new AccountResetPasswordRequest();
        $account = new Account();
        $now = new \DateTimeImmutable();
        $expiredAt = $now->modify('+1 hour');

        $request->setAccount($account);
        $request->setToken('testtoken');
        $request->setRequestedAt($now);
        $request->setExpiresAt($expiredAt);

        $this->assertSame($account, $request->getAccount());
        $this->assertEquals('testtoken', $request->getToken());
        $this->assertSame($now, $request->getRequestedAt());
        $this->assertSame($expiredAt, $request->getExpiresAt());
    }
}
