Fix Pint formatting
This commit is contained in:
@@ -38,7 +38,7 @@ class NotificationActiveServiceTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$service = new NotificationActiveService();
|
||||
$service = new NotificationActiveService;
|
||||
$result = $service->list('parent');
|
||||
|
||||
$this->assertCount(1, $result['notifications']);
|
||||
|
||||
@@ -42,7 +42,7 @@ class NotificationCleanupServiceTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$service = new NotificationCleanupService();
|
||||
$service = new NotificationCleanupService;
|
||||
$deleted = $service->cleanupExpired();
|
||||
|
||||
$this->assertSame(1, $deleted);
|
||||
|
||||
@@ -24,7 +24,7 @@ class NotificationDeletedServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new NotificationDeletedService();
|
||||
$service = new NotificationDeletedService;
|
||||
$result = $service->list();
|
||||
|
||||
$this->assertCount(1, $result['notifications']);
|
||||
|
||||
@@ -12,7 +12,7 @@ class NotificationDispatchServiceTest extends TestCase
|
||||
{
|
||||
Log::spy();
|
||||
|
||||
$service = new NotificationDispatchService();
|
||||
$service = new NotificationDispatchService;
|
||||
$service->sendEmail('parent@example.com', 'Subject', 'Message');
|
||||
$service->sendSms('5551112222', 'Message');
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class NotificationManagementServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new NotificationManagementService();
|
||||
$service = new NotificationManagementService;
|
||||
$result = $service->update(1, ['title' => 'New']);
|
||||
|
||||
$this->assertTrue($result['ok']);
|
||||
@@ -35,7 +35,7 @@ class NotificationManagementServiceTest extends TestCase
|
||||
|
||||
public function test_update_returns_false_when_missing(): void
|
||||
{
|
||||
$service = new NotificationManagementService();
|
||||
$service = new NotificationManagementService;
|
||||
$result = $service->update(999, ['title' => 'New']);
|
||||
|
||||
$this->assertFalse($result['ok']);
|
||||
@@ -53,7 +53,7 @@ class NotificationManagementServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new NotificationManagementService();
|
||||
$service = new NotificationManagementService;
|
||||
$this->assertTrue($service->delete(1));
|
||||
$this->assertSoftDeleted('notifications', ['id' => 1]);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class NotificationReadServiceTest extends TestCase
|
||||
'is_read' => 0,
|
||||
]);
|
||||
|
||||
$service = new NotificationReadService();
|
||||
$service = new NotificationReadService;
|
||||
$result = $service->markRead(1, 1);
|
||||
|
||||
$this->assertTrue($result);
|
||||
@@ -32,7 +32,7 @@ class NotificationReadServiceTest extends TestCase
|
||||
|
||||
public function test_mark_read_returns_false_when_missing(): void
|
||||
{
|
||||
$service = new NotificationReadService();
|
||||
$service = new NotificationReadService;
|
||||
|
||||
$this->assertFalse($service->markRead(1, 99));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class NotificationRecipientServiceTest extends TestCase
|
||||
'role_id' => 1,
|
||||
]);
|
||||
|
||||
$service = new NotificationRecipientService();
|
||||
$service = new NotificationRecipientService;
|
||||
$rows = $service->getRecipients('parent');
|
||||
|
||||
$this->assertCount(1, $rows);
|
||||
|
||||
@@ -30,7 +30,7 @@ class NotificationShowServiceTest extends TestCase
|
||||
'is_read' => 0,
|
||||
]);
|
||||
|
||||
$service = new NotificationShowService();
|
||||
$service = new NotificationShowService;
|
||||
$row = $service->getForUser(1, 1);
|
||||
|
||||
$this->assertNotNull($row);
|
||||
@@ -39,7 +39,7 @@ class NotificationShowServiceTest extends TestCase
|
||||
|
||||
public function test_get_for_user_returns_null_when_missing(): void
|
||||
{
|
||||
$service = new NotificationShowService();
|
||||
$service = new NotificationShowService;
|
||||
$row = $service->getForUser(1, 99);
|
||||
|
||||
$this->assertNull($row);
|
||||
|
||||
@@ -49,7 +49,7 @@ class NotificationUserListServiceTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$service = new NotificationUserListService();
|
||||
$service = new NotificationUserListService;
|
||||
$result = $service->listForUser(1, [
|
||||
'read' => true,
|
||||
'per_page' => 10,
|
||||
|
||||
@@ -34,7 +34,7 @@ class UserNotificationDispatchServiceTest extends TestCase
|
||||
'school_year' => '2025-2026',
|
||||
]);
|
||||
|
||||
$service = new UserNotificationDispatchService();
|
||||
$service = new UserNotificationDispatchService;
|
||||
$result = $service->notifyUser(1, 'Title', 'Message', ['in_app'], 'registration', 'parent');
|
||||
|
||||
$this->assertTrue($result['ok']);
|
||||
@@ -50,7 +50,7 @@ class UserNotificationDispatchServiceTest extends TestCase
|
||||
|
||||
public function test_notify_user_rejects_invalid_user(): void
|
||||
{
|
||||
$service = new UserNotificationDispatchService();
|
||||
$service = new UserNotificationDispatchService;
|
||||
$result = $service->notifyUser(0, 'Title', 'Message');
|
||||
|
||||
$this->assertFalse($result['ok']);
|
||||
|
||||
Reference in New Issue
Block a user