fix tests
This commit is contained in:
@@ -19,7 +19,7 @@ class AssignmentContextServiceTest extends TestCase
|
||||
['id' => 2, 'config_key' => 'semester', 'config_value' => 'Fall'],
|
||||
]);
|
||||
|
||||
$service = new AssignmentContextService(new Configuration());
|
||||
$service = new AssignmentContextService(new Configuration);
|
||||
|
||||
$this->assertSame('Fall', $service->getCurrentSemester());
|
||||
$this->assertSame('2025-2026', $service->getCurrentSchoolYear());
|
||||
|
||||
@@ -17,7 +17,7 @@ class AssignmentDataLoaderServiceTest extends TestCase
|
||||
{
|
||||
$this->seedTeacherData();
|
||||
|
||||
$service = new AssignmentDataLoaderService(new TeacherClass(), new StudentClass());
|
||||
$service = new AssignmentDataLoaderService(new TeacherClass, new StudentClass);
|
||||
$rows = $service->loadTeacherClasses('2025-2026');
|
||||
|
||||
$this->assertCount(1, $rows);
|
||||
@@ -28,7 +28,7 @@ class AssignmentDataLoaderServiceTest extends TestCase
|
||||
{
|
||||
$this->seedStudentData();
|
||||
|
||||
$service = new AssignmentDataLoaderService(new TeacherClass(), new StudentClass());
|
||||
$service = new AssignmentDataLoaderService(new TeacherClass, new StudentClass);
|
||||
$rows = $service->loadStudentClasses('2025-2026');
|
||||
|
||||
$this->assertCount(1, $rows);
|
||||
|
||||
@@ -13,7 +13,7 @@ class AssignmentMetaServiceTest extends TestCase
|
||||
|
||||
public function test_get_school_years_uses_fallback(): void
|
||||
{
|
||||
$service = new AssignmentMetaService();
|
||||
$service = new AssignmentMetaService;
|
||||
$years = $service->getSchoolYears('2025-2026');
|
||||
|
||||
$this->assertSame(['2025-2026'], $years);
|
||||
@@ -27,7 +27,7 @@ class AssignmentMetaServiceTest extends TestCase
|
||||
['class_section_id' => 103, 'teacher_id' => 3, 'position' => 'main', 'school_year' => '2025-2026', 'semester' => 'Fall'],
|
||||
]);
|
||||
|
||||
$service = new AssignmentMetaService();
|
||||
$service = new AssignmentMetaService;
|
||||
$years = $service->getSchoolYears();
|
||||
|
||||
$this->assertSame(['2025-2026', '2024-2025'], $years);
|
||||
@@ -35,7 +35,7 @@ class AssignmentMetaServiceTest extends TestCase
|
||||
|
||||
public function test_first_non_empty_returns_first_value(): void
|
||||
{
|
||||
$service = new AssignmentMetaService();
|
||||
$service = new AssignmentMetaService;
|
||||
$value = $service->firstNonEmpty([null, '', 'Fall', 'Spring']);
|
||||
|
||||
$this->assertSame('Fall', $value);
|
||||
|
||||
@@ -23,7 +23,7 @@ class AssignmentSectionServiceTest extends TestCase
|
||||
'school_year' => '2025-2026',
|
||||
]);
|
||||
|
||||
$service = new AssignmentSectionService(new ClassSection());
|
||||
$service = new AssignmentSectionService(new ClassSection);
|
||||
$map = $service->getSectionNamesMap([1]);
|
||||
|
||||
$this->assertSame('1-A', $map[1]);
|
||||
|
||||
Reference in New Issue
Block a user