fix test issues
API CI/CD / Validate (composer + pint) (push) Successful in 3m5s
API CI/CD / Test (PHPUnit) (push) Failing after 7m12s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m5s
API CI/CD / Test (PHPUnit) (push) Failing after 7m12s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -89,7 +89,7 @@ class ApiUseCaseCoverageMatrixTest extends TestCase
|
||||
'public_content_and_support' => '#^api/(?:v1/)?(?:login|register|auth|documentation|docs|docs/public|policies|pages|contact|frontend|health|system/db-check|access_denied|certificates/verify|timeoff/notify|winners/competitions|confirm_authorized_user|set_authorized_user_password|badge_scan|scanner)(?:/|$)#',
|
||||
'legacy_compatibility' => '#^api/(?:proofread|emails|compare|attendance-templates|attendance-comment-templates|administrator/attendance-templates)(?:/|$)#',
|
||||
'preferences_navigation_and_ui' => '#^api/v1/(?:preferences|nav-builder|landing|info-icon|dashboard|utilities|ui|settings|configuration|system|stats|role-switcher)(?:/|$)#',
|
||||
'administration_enrollment_and_school_years' => '#^api/v1/(?:administrator|school-years|class-sections|users|role-permissions|ip-bans|notifications)(?:/|$)#',
|
||||
'administration_enrollment_and_school_years' => '#^api/v1/(?:admin|administrator|school-years|class-sections|users|role-permissions|ip-bans|notifications)(?:/|$)#',
|
||||
'students_parents_and_families' => '#^api/v1/(?:students|parents|families|family-admin|emergency-contacts)(?:/|$)#',
|
||||
'teachers_staff_and_class_operations' => '#^api/v1/(?:teacher|teachers|staff|assignments|class-prep|class-progress)(?:/|$)#',
|
||||
'attendance_and_safety' => '#^api/v1/(?:attendance|attendance-tracking|attendance-comment-templates|attendance-templates|incidents)(?:/|$)#',
|
||||
|
||||
@@ -30,7 +30,8 @@ class AdministratorAbsenceServiceTest extends TestCase
|
||||
new User,
|
||||
new StaffAttendance,
|
||||
new SemesterRangeService(new SemesterConfigService),
|
||||
Mockery::mock(StaffTimeOffLinkService::class)
|
||||
Mockery::mock(StaffTimeOffLinkService::class),
|
||||
app(\App\Services\ApplicationUrlService::class),
|
||||
);
|
||||
|
||||
$request = Request::create('/absences', 'POST', ['dates' => ['2025-01-05']]);
|
||||
|
||||
@@ -19,7 +19,7 @@ class TeacherSubmissionNotificationServiceTest extends TestCase
|
||||
$shared = Mockery::mock(AdministratorSharedService::class);
|
||||
$support = Mockery::mock(TeacherSubmissionSupportService::class);
|
||||
|
||||
$service = new TeacherSubmissionNotificationService($shared, $support);
|
||||
$service = new TeacherSubmissionNotificationService($shared, $support, app(\App\Services\ApplicationUrlService::class));
|
||||
$request = Request::create('/notify', 'POST', []);
|
||||
|
||||
$result = $service->send($request, 1);
|
||||
|
||||
@@ -6,7 +6,9 @@ use App\Models\ClassProgressReport;
|
||||
use App\Models\User;
|
||||
use App\Services\ClassProgress\ClassProgressAttachmentService;
|
||||
use App\Services\ClassProgress\ClassProgressMutationService;
|
||||
use App\Services\ClassProgress\ClassProgressQueryService;
|
||||
use App\Services\ClassProgress\ClassProgressRuleService;
|
||||
use App\Services\SchoolYears\SchoolYearContextService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Tests\TestCase;
|
||||
@@ -23,7 +25,9 @@ class ClassProgressMutationServiceTest extends TestCase
|
||||
|
||||
$service = new ClassProgressMutationService(
|
||||
new ClassProgressRuleService,
|
||||
new ClassProgressAttachmentService
|
||||
new ClassProgressAttachmentService,
|
||||
app(ClassProgressQueryService::class),
|
||||
app(SchoolYearContextService::class),
|
||||
);
|
||||
|
||||
$payload = [
|
||||
@@ -48,7 +52,9 @@ class ClassProgressMutationServiceTest extends TestCase
|
||||
|
||||
$service = new ClassProgressMutationService(
|
||||
new ClassProgressRuleService,
|
||||
new ClassProgressAttachmentService
|
||||
new ClassProgressAttachmentService,
|
||||
app(ClassProgressQueryService::class),
|
||||
app(SchoolYearContextService::class),
|
||||
);
|
||||
|
||||
$updated = $service->updateReport($report, ['status' => 'behind'], []);
|
||||
@@ -61,7 +67,9 @@ class ClassProgressMutationServiceTest extends TestCase
|
||||
$report = ClassProgressReport::factory()->create();
|
||||
$service = new ClassProgressMutationService(
|
||||
new ClassProgressRuleService,
|
||||
new ClassProgressAttachmentService
|
||||
new ClassProgressAttachmentService,
|
||||
app(ClassProgressQueryService::class),
|
||||
app(SchoolYearContextService::class),
|
||||
);
|
||||
|
||||
$service->deleteReport($report);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Unit\Services\Discounts;
|
||||
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Services\Discounts\DiscountApplyService;
|
||||
use App\Services\Discounts\DiscountContextService;
|
||||
use App\Services\Discounts\DiscountInvoiceService;
|
||||
@@ -30,7 +31,7 @@ class DiscountApplyServiceTest extends TestCase
|
||||
'is_active' => 1,
|
||||
]);
|
||||
|
||||
$service = new DiscountApplyService(new DiscountContextService, new DiscountInvoiceService);
|
||||
$service = new DiscountApplyService(new DiscountContextService, new DiscountInvoiceService(app(ApplicationUrlService::class)));
|
||||
$result = $service->applyVoucher(1, [10], true, 1);
|
||||
|
||||
$this->assertFalse($result['ok']);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Unit\Services\Refunds;
|
||||
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Services\Discounts\DiscountInvoiceService;
|
||||
use App\Services\Fees\FeeRefundDetailService;
|
||||
use App\Services\Refunds\RefundInvoiceAdjustmentService;
|
||||
@@ -85,7 +86,7 @@ class RefundPolicyServiceTest extends TestCase
|
||||
|
||||
$service = new RefundPolicyService(
|
||||
new FeeRefundDetailService,
|
||||
new RefundInvoiceAdjustmentService(new DiscountInvoiceService)
|
||||
new RefundInvoiceAdjustmentService(new DiscountInvoiceService(app(ApplicationUrlService::class)))
|
||||
);
|
||||
|
||||
$result = $service->processWithdrawalRefund(10, 1, '2025-2026', 'Fall', 1);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Unit\Services\Refunds;
|
||||
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Services\Discounts\DiscountInvoiceService;
|
||||
use App\Services\Fees\FeeRefundDetailService;
|
||||
use App\Services\Refunds\RefundInvoiceAdjustmentService;
|
||||
@@ -61,7 +62,7 @@ class RefundRequestServiceTest extends TestCase
|
||||
$service = new RefundRequestService(
|
||||
new RefundPolicyService(
|
||||
new FeeRefundDetailService,
|
||||
new RefundInvoiceAdjustmentService(new DiscountInvoiceService)
|
||||
new RefundInvoiceAdjustmentService(new DiscountInvoiceService(app(ApplicationUrlService::class)))
|
||||
),
|
||||
new RefundSummaryService,
|
||||
new RefundNotificationService
|
||||
|
||||
Reference in New Issue
Block a user