2023-03-08 17:43:26 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Unit\Events;
|
|
|
|
|
|
|
|
use App\Events\GroupDeleted;
|
|
|
|
use App\Models\Group;
|
2023-08-01 11:28:27 +02:00
|
|
|
use PHPUnit\Framework\Attributes\CoversClass;
|
2024-06-26 14:29:13 +02:00
|
|
|
use PHPUnit\Framework\Attributes\Test;
|
2023-03-08 17:43:26 +01:00
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
/**
|
2023-08-01 11:28:27 +02:00
|
|
|
* GroupDeletedTest test class
|
2023-03-08 17:43:26 +01:00
|
|
|
*/
|
2023-08-01 11:28:27 +02:00
|
|
|
#[CoversClass(GroupDeleted::class)]
|
2023-03-08 17:43:26 +01:00
|
|
|
class GroupDeletedTest extends TestCase
|
|
|
|
{
|
2024-06-26 14:29:13 +02:00
|
|
|
#[Test]
|
2023-03-08 17:43:26 +01:00
|
|
|
public function test_event_constructor()
|
|
|
|
{
|
|
|
|
$group = Group::factory()->make();
|
|
|
|
$event = new GroupDeleted($group);
|
|
|
|
|
|
|
|
$this->assertSame($group, $event->group);
|
|
|
|
}
|
|
|
|
}
|