fix gitlab tests
This commit is contained in:
@@ -21,7 +21,7 @@ class ClassPreparationAdjustmentServiceTest extends TestCase
|
||||
'adjustable' => 1,
|
||||
]);
|
||||
|
||||
$service = new ClassPreparationAdjustmentService;
|
||||
$service = new ClassPreparationAdjustmentService();
|
||||
[$items, $adjMap] = $service->applyAdjustments(['Small Table' => 1], '101', '2025-2026');
|
||||
|
||||
$this->assertSame(3, $items['Small Table']);
|
||||
|
||||
@@ -22,7 +22,7 @@ class ClassPreparationCalculatorServiceTest extends TestCase
|
||||
'school_year' => '2025-2026',
|
||||
]);
|
||||
|
||||
$service = new ClassPreparationCalculatorService;
|
||||
$service = new ClassPreparationCalculatorService();
|
||||
|
||||
$this->assertSame(2, $service->getClassLevelBySection('101'));
|
||||
$this->assertSame(1, $service->getClassLevelBySection('KG'));
|
||||
@@ -49,7 +49,7 @@ class ClassPreparationCalculatorServiceTest extends TestCase
|
||||
'school_year' => '2025-2026',
|
||||
]);
|
||||
|
||||
$service = new ClassPreparationCalculatorService;
|
||||
$service = new ClassPreparationCalculatorService();
|
||||
$items = $service->calculatePrepItems(6, 1, '101');
|
||||
|
||||
$this->assertSame(2, $items['Small Table']);
|
||||
|
||||
@@ -20,7 +20,7 @@ class ClassPreparationContextServiceTest extends TestCase
|
||||
'school_year' => '2025-2026',
|
||||
]);
|
||||
|
||||
$service = new ClassPreparationContextService;
|
||||
$service = new ClassPreparationContextService();
|
||||
|
||||
$this->assertTrue($service->hasRosterForSemester('2025-2026', 'Fall'));
|
||||
$this->assertFalse($service->hasRosterForSemester('2025-2026', 'Spring'));
|
||||
|
||||
@@ -40,7 +40,7 @@ class ClassPreparationInventoryServiceTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$service = new ClassPreparationInventoryService;
|
||||
$service = new ClassPreparationInventoryService();
|
||||
$map = $service->buildAvailability('2025-2026', 'Fall', true, ['Small Table']);
|
||||
|
||||
$this->assertSame(8, $map['Small Table']);
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Tests\Unit\Services\ClassPreparation;
|
||||
|
||||
use App\Services\ClassPreparation\ClassPreparationLogService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ClassPreparationLogServiceTest extends TestCase
|
||||
@@ -12,7 +13,7 @@ class ClassPreparationLogServiceTest extends TestCase
|
||||
|
||||
public function test_has_prep_changed_detects_diff(): void
|
||||
{
|
||||
$service = new ClassPreparationLogService;
|
||||
$service = new ClassPreparationLogService();
|
||||
|
||||
$this->assertTrue($service->hasPrepChanged(['a' => 1], ['a' => 2]));
|
||||
$this->assertFalse($service->hasPrepChanged(['a' => 1], ['a' => 1]));
|
||||
@@ -20,7 +21,7 @@ class ClassPreparationLogServiceTest extends TestCase
|
||||
|
||||
public function test_create_log_and_get_latest(): void
|
||||
{
|
||||
$service = new ClassPreparationLogService;
|
||||
$service = new ClassPreparationLogService();
|
||||
$created = $service->createLog('101', '1-A', '2025-2026', ['Small Table' => 2], '2025-09-01 00:00:00');
|
||||
|
||||
$this->assertTrue($created);
|
||||
|
||||
@@ -15,7 +15,7 @@ class ClassPreparationRosterServiceTest extends TestCase
|
||||
{
|
||||
$this->seedRoster();
|
||||
|
||||
$service = new ClassPreparationRosterService;
|
||||
$service = new ClassPreparationRosterService();
|
||||
$rows = $service->getClassSectionStudentCounts('2025-2026', 'Fall', true);
|
||||
|
||||
$this->assertCount(1, $rows);
|
||||
@@ -27,7 +27,7 @@ class ClassPreparationRosterServiceTest extends TestCase
|
||||
{
|
||||
$this->seedRoster();
|
||||
|
||||
$service = new ClassPreparationRosterService;
|
||||
$service = new ClassPreparationRosterService();
|
||||
$count = $service->getStudentCountForSection('2025-2026', 'Fall', true, '101');
|
||||
|
||||
$this->assertSame(2, $count);
|
||||
|
||||
Reference in New Issue
Block a user