fix tests
This commit is contained in:
@@ -40,7 +40,7 @@ class FamilyFinanceServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new FamilyFinanceService();
|
||||
$service = new FamilyFinanceService;
|
||||
$result = $service->loadFinancialsForParents([1]);
|
||||
|
||||
$this->assertSame(1, $result['summary']['invoices_count']);
|
||||
|
||||
@@ -16,7 +16,7 @@ class FamilyMutationServiceTest extends TestCase
|
||||
$this->seedUser(1);
|
||||
$this->seedStudent(10, 1);
|
||||
|
||||
$service = new FamilyMutationService();
|
||||
$service = new FamilyMutationService;
|
||||
$result = $service->bootstrapFamilies();
|
||||
|
||||
$this->assertSame(1, $result['families_created']);
|
||||
@@ -36,7 +36,7 @@ class FamilyMutationServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new FamilyMutationService();
|
||||
$service = new FamilyMutationService;
|
||||
$result = $service->attachSecondByEmail(10, 'secondary@example.com', 'Second', 'Parent');
|
||||
|
||||
$this->assertTrue($result['ok']);
|
||||
@@ -63,7 +63,7 @@ class FamilyMutationServiceTest extends TestCase
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$service = new FamilyMutationService();
|
||||
$service = new FamilyMutationService;
|
||||
$service->setPrimaryHome($familyId, 10, true);
|
||||
|
||||
$this->assertDatabaseHas('family_students', [
|
||||
@@ -80,7 +80,7 @@ class FamilyMutationServiceTest extends TestCase
|
||||
'firstname' => 'Parent',
|
||||
'lastname' => 'User',
|
||||
'cellphone' => '9999999999',
|
||||
'email' => 'parent' . $id . '@example.com',
|
||||
'email' => 'parent'.$id.'@example.com',
|
||||
'address_street' => '123 Street',
|
||||
'city' => 'City',
|
||||
'state' => 'ST',
|
||||
|
||||
@@ -20,7 +20,7 @@ class FamilyQueryServiceTest extends TestCase
|
||||
$this->seedFamilyStudent($familyId, $studentId);
|
||||
$this->seedFamilyGuardian($familyId, 1);
|
||||
|
||||
$service = new FamilyQueryService(new FamilyFinanceService());
|
||||
$service = new FamilyQueryService(new FamilyFinanceService);
|
||||
$result = $service->adminIndexData($studentId, null, '2025-2026');
|
||||
|
||||
$this->assertNotEmpty($result['families']);
|
||||
@@ -31,7 +31,7 @@ class FamilyQueryServiceTest extends TestCase
|
||||
{
|
||||
$this->seedStudent(10, 1);
|
||||
|
||||
$service = new FamilyQueryService(new FamilyFinanceService());
|
||||
$service = new FamilyQueryService(new FamilyFinanceService);
|
||||
$items = $service->searchSuggestions('Student', 5);
|
||||
|
||||
$this->assertNotEmpty($items);
|
||||
@@ -46,7 +46,7 @@ class FamilyQueryServiceTest extends TestCase
|
||||
$this->seedFamilyStudent($familyId, $studentId);
|
||||
$this->seedFamilyGuardian($familyId, 1);
|
||||
|
||||
$service = new FamilyQueryService(new FamilyFinanceService());
|
||||
$service = new FamilyQueryService(new FamilyFinanceService);
|
||||
$family = $service->familyCard(null, null, $familyId, '2025-2026');
|
||||
|
||||
$this->assertNotNull($family);
|
||||
@@ -68,7 +68,7 @@ class FamilyQueryServiceTest extends TestCase
|
||||
'firstname' => 'Parent',
|
||||
'lastname' => 'User',
|
||||
'cellphone' => '9999999999',
|
||||
'email' => 'parent' . $parentId . '@example.com',
|
||||
'email' => 'parent'.$parentId.'@example.com',
|
||||
'address_street' => '123 Street',
|
||||
'city' => 'City',
|
||||
'state' => 'ST',
|
||||
@@ -103,7 +103,7 @@ class FamilyQueryServiceTest extends TestCase
|
||||
{
|
||||
return DB::table('families')->insertGetId([
|
||||
'family_code' => $code,
|
||||
'household_name' => 'Family ' . $code,
|
||||
'household_name' => 'Family '.$code,
|
||||
'is_active' => 1,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
|
||||
Reference in New Issue
Block a user