fix unit tests as well as missing code
API CI/CD / Validate (composer + pint) (push) Successful in 2m7s
API CI/CD / Test (PHPUnit) (push) Failing after 2m23s
API CI/CD / Build frontend assets (push) Successful in 2m18s
API CI/CD / Security audit (push) Successful in 31s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

This commit is contained in:
root
2026-06-25 14:26:32 -04:00
parent fdfcd1f0e2
commit 940afe9319
115 changed files with 4554 additions and 290 deletions
+20 -20
View File
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/phpunit.xml" tests="14" assertions="88" errors="0" failures="1" skipped="0" time="1.293065">
<testsuite name="Feature" tests="14" assertions="88" errors="0" failures="1" skipped="0" time="1.293065">
<testsuite name="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" tests="3" assertions="22" errors="0" failures="0" skipped="0" time="0.631035">
<testcase name="test_attendance_comment_templates_can_be_managed_through_current_api" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="14" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="12" time="0.590915"/>
<testcase name="test_attendance_comment_template_validation_blocks_bad_ranges" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="51" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="4" time="0.019492"/>
<testcase name="test_legacy_attendance_template_aliases_still_work" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="64" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="6" time="0.020628"/>
<testsuite name="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/phpunit.xml" tests="14" assertions="88" errors="0" failures="1" skipped="0" time="0.936905">
<testsuite name="Feature" tests="14" assertions="88" errors="0" failures="1" skipped="0" time="0.936905">
<testsuite name="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" tests="3" assertions="22" errors="0" failures="0" skipped="0" time="0.495418">
<testcase name="test_attendance_comment_templates_can_be_managed_through_current_api" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="14" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="12" time="0.459266"/>
<testcase name="test_attendance_comment_template_validation_blocks_bad_ranges" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="51" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="4" time="0.017761"/>
<testcase name="test_legacy_attendance_template_aliases_still_work" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAttendanceTemplateFeatureTest.php" line="64" class="Tests\Feature\Api\ApiAttendanceTemplateFeatureTest" classname="Tests.Feature.Api.ApiAttendanceTemplateFeatureTest" assertions="6" time="0.018392"/>
</testsuite>
<testsuite name="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" tests="6" assertions="38" errors="0" failures="0" skipped="0" time="0.532192">
<testcase name="test_api_login_returns_token_and_user_object" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="16" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="14" time="0.046767"/>
<testcase name="test_session_login_also_returns_token_and_user_object_for_spa_clients" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="40" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="13" time="0.033410"/>
<testcase name="test_auth_me_requires_authentication" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="63" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="1" time="0.016178"/>
<testcase name="test_auth_me_returns_the_current_authenticated_user" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="68" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="3" time="0.018364"/>
<testcase name="test_admin_only_routes_reject_non_admin_users" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="83" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="6" time="0.045925"/>
<testcase name="test_protected_api_routes_reject_anonymous_requests_before_business_logic" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="99" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="1" time="0.371549"/>
<testsuite name="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" tests="6" assertions="38" errors="0" failures="0" skipped="0" time="0.327981">
<testcase name="test_api_login_returns_token_and_user_object" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="16" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="14" time="0.044219"/>
<testcase name="test_session_login_also_returns_token_and_user_object_for_spa_clients" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="40" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="13" time="0.032755"/>
<testcase name="test_auth_me_requires_authentication" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="63" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="1" time="0.014267"/>
<testcase name="test_auth_me_returns_the_current_authenticated_user" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="68" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="3" time="0.014557"/>
<testcase name="test_admin_only_routes_reject_non_admin_users" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="83" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="6" time="0.026174"/>
<testcase name="test_protected_api_routes_reject_anonymous_requests_before_business_logic" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiAuthenticationAndAuthorizationTest.php" line="99" class="Tests\Feature\Api\ApiAuthenticationAndAuthorizationTest" classname="Tests.Feature.Api.ApiAuthenticationAndAuthorizationTest" assertions="1" time="0.196009"/>
</testsuite>
<testsuite name="Tests\Feature\Api\ApiPreferencesFeatureTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" tests="4" assertions="27" errors="0" failures="0" skipped="0" time="0.092580">
<testcase name="test_authenticated_user_can_create_read_update_and_delete_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="14" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="12" time="0.025075"/>
<testcase name="test_non_admin_cannot_list_or_manage_another_users_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="50" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="6" time="0.025534"/>
<testcase name="test_admin_can_list_and_delete_any_users_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="82" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="5" time="0.022858"/>
<testcase name="test_preferences_validation_rejects_invalid_options" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="103" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="4" time="0.019113"/>
<testsuite name="Tests\Feature\Api\ApiPreferencesFeatureTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" tests="4" assertions="27" errors="0" failures="0" skipped="0" time="0.082273">
<testcase name="test_authenticated_user_can_create_read_update_and_delete_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="14" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="12" time="0.023361"/>
<testcase name="test_non_admin_cannot_list_or_manage_another_users_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="50" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="6" time="0.022090"/>
<testcase name="test_admin_can_list_and_delete_any_users_preferences" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="82" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="5" time="0.020525"/>
<testcase name="test_preferences_validation_rejects_invalid_options" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPreferencesFeatureTest.php" line="103" class="Tests\Feature\Api\ApiPreferencesFeatureTest" classname="Tests.Feature.Api.ApiPreferencesFeatureTest" assertions="4" time="0.016297"/>
</testsuite>
<testsuite name="Tests\Feature\Api\ApiPublicEndpointsTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPublicEndpointsTest.php" tests="1" assertions="1" errors="0" failures="1" skipped="0" time="0.037258">
<testcase name="test_health_endpoint_is_available" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPublicEndpointsTest.php" line="12" class="Tests\Feature\Api\ApiPublicEndpointsTest" classname="Tests.Feature.Api.ApiPublicEndpointsTest" assertions="1" time="0.037258">
<testsuite name="Tests\Feature\Api\ApiPublicEndpointsTest" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPublicEndpointsTest.php" tests="1" assertions="1" errors="0" failures="1" skipped="0" time="0.031232">
<testcase name="test_health_endpoint_is_available" file="/Volumes/ExternalApps/repos/alrahma_sunday_school_api/tests/Feature/Api/ApiPublicEndpointsTest.php" line="12" class="Tests\Feature\Api\ApiPublicEndpointsTest" classname="Tests.Feature.Api.ApiPublicEndpointsTest" assertions="1" time="0.031232">
<failure type="PHPUnit\Framework\ExpectationFailedException">Tests\Feature\Api\ApiPublicEndpointsTest::test_health_endpoint_is_available
Expected response status code [200] but received 503.
Failed asserting that 503 is identical to 200.