fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -97,7 +97,7 @@ class PreferencesControllerTest extends TestCase
$user = $this->createUser('teacher');
Sanctum::actingAs($user);
$response = $this->deleteJson('/api/v1/preferences/'.$user->id);
$response = $this->deleteJson('/api/v1/preferences/' . $user->id);
$response->assertForbidden();
}
@@ -113,7 +113,7 @@ class PreferencesControllerTest extends TestCase
'notification_sms' => 1,
]);
$response = $this->deleteJson('/api/v1/preferences/'.$admin->id);
$response = $this->deleteJson('/api/v1/preferences/' . $admin->id);
$response->assertOk();
$this->assertDatabaseMissing('user_preferences', [
@@ -146,7 +146,7 @@ class PreferencesControllerTest extends TestCase
'id' => $id,
'firstname' => 'Test',
'lastname' => 'User',
'email' => $roleName.$id.'@example.com',
'email' => $roleName . $id . '@example.com',
'cellphone' => '5555555555',
'address_street' => '123 Main',
'city' => 'City',
@@ -3,7 +3,6 @@
namespace Tests\Feature\Api\V1\Settings;
use App\Models\User;
use App\Services\Settings\SchoolCalendar\SchoolCalendarMutationService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Laravel\Sanctum\Sanctum;
@@ -51,7 +50,7 @@ class SchoolCalendarControllerTest extends TestCase
$eventId = $this->seedEvent();
Sanctum::actingAs($user);
$response = $this->getJson('/api/v1/settings/school-calendar/events/'.$eventId);
$response = $this->getJson('/api/v1/settings/school-calendar/events/' . $eventId);
$response->assertOk();
$response->assertJsonPath('status', true);
@@ -89,7 +88,7 @@ class SchoolCalendarControllerTest extends TestCase
$eventId = $this->seedEvent();
Sanctum::actingAs($user);
$response = $this->patchJson('/api/v1/settings/school-calendar/events/'.$eventId, [
$response = $this->patchJson('/api/v1/settings/school-calendar/events/' . $eventId, [
'title' => 'Updated Event',
]);
@@ -108,7 +107,7 @@ class SchoolCalendarControllerTest extends TestCase
$eventId = $this->seedEvent();
Sanctum::actingAs($user);
$response = $this->deleteJson('/api/v1/settings/school-calendar/events/'.$eventId);
$response = $this->deleteJson('/api/v1/settings/school-calendar/events/' . $eventId);
$response->assertOk();
$response->assertJsonPath('status', true);
@@ -135,9 +134,8 @@ class SchoolCalendarControllerTest extends TestCase
$user = $this->seedUser();
Sanctum::actingAs($user);
$this->app->bind(SchoolCalendarMutationService::class, function () {
return new class
{
$this->app->bind(\App\Services\Settings\SchoolCalendar\SchoolCalendarMutationService::class, function () {
return new class {
public function create(array $payload, array $targets = []): array
{
throw new \RuntimeException('fail');
@@ -2,6 +2,7 @@
namespace Tests\Feature\Api\V1\Settings;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
@@ -79,7 +80,7 @@ class SettingsControllerTest extends TestCase
$user = User::query()->create([
'firstname' => 'Test',
'lastname' => 'User',
'email' => $roleName.'@example.com',
'email' => $roleName . '@example.com',
'cellphone' => '5555555555',
'address_street' => '123 Main',
'city' => 'City',