2024-07-03 11:16:08 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Feature\Models;
|
|
|
|
|
|
|
|
use App\Models\AuthLog;
|
|
|
|
use App\Models\User;
|
|
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
|
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
|
|
use Tests\FeatureTestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UserModelTest test class
|
|
|
|
*/
|
|
|
|
#[CoversClass(AuthLog::class)]
|
|
|
|
class AuthLogModelTest extends FeatureTestCase
|
|
|
|
{
|
|
|
|
#[Test]
|
|
|
|
public function test_equals_returns_true()
|
|
|
|
{
|
2024-09-26 23:50:01 +02:00
|
|
|
$user = User::factory()->create();
|
2024-07-03 11:16:08 +02:00
|
|
|
$lastAuthLog = AuthLog::factory()->for($user, 'authenticatable')->create();
|
|
|
|
|
|
|
|
$this->assertTrue($lastAuthLog->equals($lastAuthLog));
|
|
|
|
}
|
|
|
|
}
|