2FAuth/tests/Feature/Models/GroupModelTest.php
2024-07-06 16:05:48 +02:00

27 lines
579 B
PHP

<?php
namespace Tests\Feature\Models;
use App\Models\Group;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use Tests\FeatureTestCase;
/**
* GroupModelTest test class
*/
#[CoversClass(Group::class)]
class GroupModelTest extends FeatureTestCase
{
#[Test]
public function test_scopeOrphans_retreives_accounts_without_owner()
{
$orphan = Group::factory()->create();
$orphans = Group::orphans()->get();
$this->assertCount(1, $orphans);
$this->assertEquals($orphan->id, $orphans[0]->id);
}
}