Fix Laravel Pint formatting
This commit is contained in:
@@ -54,11 +54,11 @@ class ScenarioAFamilyEnrollmentTest extends TestCase
|
||||
|
||||
// Teacher sees student in roster.
|
||||
$this->actingAs($teacher, 'api');
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id=' . $classSectionId)
|
||||
$this->getJson('/api/v1/teachers/classes?class_section_id='.$classSectionId)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$studentIds = array_column($this->getJson('/api/v1/teachers/classes?class_section_id=' . $classSectionId)->json('students'), 'student_id');
|
||||
$studentIds = array_column($this->getJson('/api/v1/teachers/classes?class_section_id='.$classSectionId)->json('students'), 'student_id');
|
||||
$this->assertContains($studentId, $studentIds);
|
||||
|
||||
// Parent sees own profile.
|
||||
@@ -89,7 +89,7 @@ class ScenarioAFamilyEnrollmentTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->actingAs($parentA, 'api');
|
||||
$this->patchJson('/api/v1/parents/students/' . $studentB, [
|
||||
$this->patchJson('/api/v1/parents/students/'.$studentB, [
|
||||
'firstname' => 'Hacked',
|
||||
'lastname' => 'Child',
|
||||
'dob' => '2015-01-01',
|
||||
|
||||
@@ -27,7 +27,7 @@ class ScenarioBSundaySchoolDayTest extends TestCase
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
$form = $this->getJson('/api/v1/attendance/teacher/form?class_section_id=' . $classSectionId)
|
||||
$form = $this->getJson('/api/v1/attendance/teacher/form?class_section_id='.$classSectionId)
|
||||
->assertOk();
|
||||
|
||||
$date = (string) ($form->json('data.current_sunday') ?? '2025-10-05');
|
||||
@@ -52,7 +52,7 @@ class ScenarioBSundaySchoolDayTest extends TestCase
|
||||
|
||||
// Parent views attendance for their child.
|
||||
$this->actingAs($parent, 'api');
|
||||
$this->getJson('/api/v1/parents/attendance?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/parents/attendance?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ScenarioCAcademicTermTest extends TestCase
|
||||
|
||||
$this->actingAs($teacher, 'api');
|
||||
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id=' . $classSectionId . '&semester=' . self::E2E_SEMESTER . '&school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/scores/overview?class_section_id='.$classSectionId.'&semester='.self::E2E_SEMESTER.'&school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -69,7 +69,7 @@ class ScenarioCAcademicTermTest extends TestCase
|
||||
'is_locked' => 1,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/reports/report-cards/students/' . $studentId . '?school_year=' . self::E2E_SCHOOL_YEAR . '&semester=' . self::E2E_SEMESTER)
|
||||
$this->getJson('/api/v1/reports/report-cards/students/'.$studentId.'?school_year='.self::E2E_SCHOOL_YEAR.'&semester='.self::E2E_SEMESTER)
|
||||
->assertOk();
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class ScenarioDFamilyBillingTest extends TestCase
|
||||
->value('id');
|
||||
$this->assertGreaterThan(0, $chargeId);
|
||||
|
||||
$this->postJson('/api/v1/finance/event-charges/' . $chargeId . '/approve')
|
||||
$this->postJson('/api/v1/finance/event-charges/'.$chargeId.'/approve')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -81,7 +81,7 @@ class ScenarioDFamilyBillingTest extends TestCase
|
||||
'invoice_id' => $invoiceId,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/v1/finance/payments/parent/' . $parentId . '?school_year=' . self::E2E_SCHOOL_YEAR)
|
||||
$this->getJson('/api/v1/finance/payments/parent/'.$parentId.'?school_year='.self::E2E_SCHOOL_YEAR)
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
$parent = $this->createApiUserWithRole('parent');
|
||||
$priorInvoiceId = $this->seedPriorYearUnpaidInvoice($parent->id);
|
||||
|
||||
$preview = $this->getJson('/api/v1/finance/carryforwards/preview?' . http_build_query([
|
||||
$preview = $this->getJson('/api/v1/finance/carryforwards/preview?'.http_build_query([
|
||||
'from_school_year' => self::E2E_PREV_SCHOOL_YEAR,
|
||||
'to_school_year' => self::E2E_SCHOOL_YEAR,
|
||||
'parent_id' => $parent->id,
|
||||
@@ -44,24 +44,24 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
$this->assertNotEmpty($draft->json('result.created'));
|
||||
|
||||
$carryforwardId = (int) $draft->json('result.created.0.id');
|
||||
$this->postJson('/api/v1/finance/carryforwards/' . $carryforwardId . '/approve')
|
||||
$this->postJson('/api/v1/finance/carryforwards/'.$carryforwardId.'/approve')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$posted = $this->postJson('/api/v1/finance/carryforwards/' . $carryforwardId . '/post')
|
||||
$posted = $this->postJson('/api/v1/finance/carryforwards/'.$carryforwardId.'/post')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
$newInvoiceId = (int) ($posted->json('carryforward.posted_invoice_id') ?? 0);
|
||||
$this->assertGreaterThan(0, $newInvoiceId);
|
||||
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/' . $newInvoiceId . '/installment-plans', [
|
||||
$plan = $this->postJson('/api/v1/finance/invoices/'.$newInvoiceId.'/installment-plans', [
|
||||
'number_of_installments' => 2,
|
||||
'first_due_date' => '2025-09-15',
|
||||
'interval_months' => 1,
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$planId = (int) $plan->json('plan.id');
|
||||
$this->postJson('/api/v1/finance/installment-plans/' . $planId . '/activate')
|
||||
$this->postJson('/api/v1/finance/installment-plans/'.$planId.'/activate')
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -81,7 +81,7 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$this->postJson('/api/v1/finance/payments/' . $paymentId . '/allocate-installments', [])
|
||||
$this->postJson('/api/v1/finance/payments/'.$paymentId.'/allocate-installments', [])
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
@@ -89,20 +89,20 @@ class ScenarioEFinanceEdgeTest extends TestCase
|
||||
->assertOk()
|
||||
->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/note', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/note', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'school_year' => self::E2E_SCHOOL_YEAR,
|
||||
'note' => 'Called parent about prior-year balance.',
|
||||
'contact_method' => 'phone',
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/promise-to-pay', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/promise-to-pay', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'promise_to_pay_date' => '2025-10-15',
|
||||
'promise_to_pay_amount' => 50,
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/' . $parent->id . '/resolve', [
|
||||
$this->postJson('/api/v1/finance/parent-payment-followups/'.$parent->id.'/resolve', [
|
||||
'invoice_id' => $newInvoiceId,
|
||||
'note' => 'Balance plan agreed.',
|
||||
])->assertCreated()->assertJsonPath('ok', true);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Tests\Feature\Api\V1\Workflows;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Tests\Concerns\SeedsE2ETestFixtures;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -36,7 +36,7 @@ class ScenarioGPrintBadgeTest extends TestCase
|
||||
|
||||
$this->actingAs($admin, 'api');
|
||||
foreach (['assigned', 'done', 'delivered'] as $status) {
|
||||
$this->patchJson('/api/v1/print-requests/' . $requestId . '/status', [
|
||||
$this->patchJson('/api/v1/print-requests/'.$requestId.'/status', [
|
||||
'status' => $status,
|
||||
])->assertOk();
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class ScenarioGPrintBadgeTest extends TestCase
|
||||
'status' => 'delivered',
|
||||
]);
|
||||
|
||||
$badgeTag = 'E2E-BADGE-' . random_int(10000, 99999);
|
||||
$badgeTag = 'E2E-BADGE-'.random_int(10000, 99999);
|
||||
DB::table('users')->where('id', $teacher->id)->update(['rfid_tag' => $badgeTag]);
|
||||
|
||||
$this->postJson('/api/v1/badges/log-print', [
|
||||
|
||||
@@ -29,7 +29,7 @@ class ScenarioHSecurityUnauthorizedAccessTest extends TestCase
|
||||
|
||||
// Parent cannot update another family's student.
|
||||
$this->actingAs($parentA, 'api');
|
||||
$this->patchJson('/api/v1/parents/students/' . $world['student_id'], [
|
||||
$this->patchJson('/api/v1/parents/students/'.$world['student_id'], [
|
||||
'firstname' => 'Blocked',
|
||||
'lastname' => 'Update',
|
||||
'dob' => '2014-01-01',
|
||||
|
||||
@@ -26,6 +26,7 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
use RefreshDatabase;
|
||||
|
||||
private const SCHOOL_YEAR = '2025-2026';
|
||||
|
||||
private const SEMESTER = 'Fall';
|
||||
|
||||
public function test_admin_creates_account_adds_student_and_enrolls_them(): void
|
||||
@@ -127,14 +128,14 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
]);
|
||||
|
||||
// The class roster endpoint reflects the assignment.
|
||||
$classes = $this->getJson('/api/v1/students/' . $studentId . '/classes');
|
||||
$classes = $this->getJson('/api/v1/students/'.$studentId.'/classes');
|
||||
$classes->assertOk()->assertJsonPath('ok', true);
|
||||
$assignedIds = array_column($classes->json('classes'), 'class_section_id');
|
||||
$this->assertContains($classSectionId, $assignedIds);
|
||||
|
||||
// 5. Move the student to "enrolled" via the enrollment workflow.
|
||||
$statusResponse = $this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'enrolled']]),
|
||||
[]
|
||||
);
|
||||
@@ -194,14 +195,14 @@ class StudentEnrollmentWorkflowTest extends TestCase
|
||||
|
||||
// First enrol...
|
||||
$this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'enrolled']]),
|
||||
[]
|
||||
)->assertOk();
|
||||
|
||||
// ...then withdraw.
|
||||
$this->post(
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?' .
|
||||
'/api/v1/administrator/enrollment-withdrawal/update-statuses?'.
|
||||
http_build_query(['enrollment_status' => [$studentId => 'withdrawn']]),
|
||||
[]
|
||||
)->assertOk();
|
||||
|
||||
Reference in New Issue
Block a user