<?php

namespace App\Tests\Entity;

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

class AccountLoginRegisterTest extends TestCase
{
    public function testGettersAndSetters()
    {
        $loginRegister = new AccountLoginRegister();
        $account = new Account();
        $now = new \DateTimeImmutable();

        $loginRegister->setAccount($account);
        $loginRegister->setLoginAt($now);
        $loginRegister->setIp('127.0.0.1');
        $loginRegister->setUserAgent('TestAgent');

        $this->assertSame($account, $loginRegister->getAccount());
        $this->assertSame($now, $loginRegister->getLoginAt());
        $this->assertEquals('127.0.0.1', $loginRegister->getIp());
        $this->assertEquals('TestAgent', $loginRegister->getUserAgent());
    }
}
