fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
+6 -6
View File
@@ -133,7 +133,7 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$model = new AdditionalCharge;
$model = new AdditionalCharge();
$result = $model->markApplied([$first->id, (string) $second->id], $invoiceId);
$this->assertTrue($result);
@@ -173,7 +173,7 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$paginator = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Spring', null, null, 50, true);
$paginator = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Spring', null, null, 50, true);
$this->assertSame(1, $paginator->total());
$first = $paginator->items()[0];
@@ -225,19 +225,19 @@ class AdditionalChargeTest extends TestCase
'created_by' => null,
]);
$paginator = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'Math', 50, true);
$paginator = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'Math', 50, true);
$this->assertSame(1, $paginator->total());
$this->assertSame('Math Club Fee', $paginator->items()[0]->title);
$byDescription = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'enrichment', 50, true);
$byDescription = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'enrichment', 50, true);
$this->assertSame(1, $byDescription->total());
$this->assertSame('Math Club Fee', $byDescription->items()[0]->title);
$byParentName = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'Hassan', 50, true);
$byParentName = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'Hassan', 50, true);
$this->assertSame(2, $byParentName->total());
$byInvoice = (new AdditionalCharge)->listAllForTerm('2024-2025', 'Fall', null, 'INV-2025-001', 50, true);
$byInvoice = (new AdditionalCharge())->listAllForTerm('2024-2025', 'Fall', null, 'INV-2025-001', 50, true);
$this->assertSame(2, $byInvoice->total());
}
}
@@ -48,7 +48,7 @@ class AttendanceCommentTemplateModelTest extends TestCase
'is_active' => 1,
]);
$model = new AttendanceCommentTemplate;
$model = new AttendanceCommentTemplate();
$results = $model->getActiveTemplates();
$this->assertCount(2, $results);
+4 -4
View File
@@ -66,7 +66,7 @@ class AttendanceDataTest extends TestCase
'modified_by' => null,
]);
$model = new AttendanceData;
$model = new AttendanceData();
$rows = $model->getAttendanceByClass(1, 2, '2024-09-01');
$this->assertCount(1, $rows);
@@ -125,7 +125,7 @@ class AttendanceDataTest extends TestCase
],
]);
$model = new AttendanceData;
$model = new AttendanceData();
$rows = $model->unreportedTermRows([1, 2, 3], '2024-2025', 'Fall');
$this->assertCount(1, $rows);
@@ -182,7 +182,7 @@ class AttendanceDataTest extends TestCase
],
]);
$model = new AttendanceData;
$model = new AttendanceData();
$rows = $model->getUnreportedAbsencesAndLates('2024-2025', 'Fall');
$this->assertArrayHasKey(10, $rows);
@@ -209,7 +209,7 @@ class AttendanceDataTest extends TestCase
'updated_at' => now(),
]);
$model = new AttendanceData;
$model = new AttendanceData();
$result = $model->markReportedAndNotified(20, ['2024-09-10'], 'Fall', '2024-2025');
$this->assertTrue($result);
@@ -28,7 +28,7 @@ class AttendanceEmailTemplateTest extends TestCase
'is_active' => true,
]);
$result = (new AttendanceEmailTemplate)->getTemplate('attendance_absent', 'answered');
$result = (new AttendanceEmailTemplate())->getTemplate('attendance_absent', 'answered');
$this->assertIsArray($result);
$this->assertSame('answered', $result['variant']);
@@ -45,7 +45,7 @@ class AttendanceEmailTemplateTest extends TestCase
'is_active' => true,
]);
$result = (new AttendanceEmailTemplate)->getTemplate('attendance_late', 'answered');
$result = (new AttendanceEmailTemplate())->getTemplate('attendance_late', 'answered');
$this->assertIsArray($result);
$this->assertSame('default', $result['variant']);
@@ -70,7 +70,7 @@ class AttendanceEmailTemplateTest extends TestCase
'is_active' => true,
]);
$result = (new AttendanceEmailTemplate)->getTemplate('attendance_present', 'no_answer');
$result = (new AttendanceEmailTemplate())->getTemplate('attendance_present', 'no_answer');
$this->assertIsArray($result);
$this->assertSame('default', $result['variant']);
@@ -87,7 +87,7 @@ class AttendanceEmailTemplateTest extends TestCase
'is_active' => false,
]);
$result = (new AttendanceEmailTemplate)->getTemplate('attendance_unknown', 'anything');
$result = (new AttendanceEmailTemplate())->getTemplate('attendance_unknown', 'anything');
$this->assertNull($result);
}
+3 -3
View File
@@ -9,16 +9,16 @@ class AttendanceRecordTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new AttendanceRecord;
$model = new AttendanceRecord();
$this->assertSame('attendance_record', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['class_section_id', 'student_id', 'school_id', 'total_absence', 'total_late', 'total_presence', 'total_attendance', 'semester', 'school_year', 'modified_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["class_section_id", "student_id", "school_id", "total_absence", "total_late", "total_presence", "total_attendance", "semester", "school_year", "modified_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(AttendanceRecord::class, new AttendanceRecord);
$this->assertInstanceOf(AttendanceRecord::class, new AttendanceRecord());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class AttendanceTrackingTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new AttendanceTracking;
$model = new AttendanceTracking();
$this->assertSame('attendance_tracking', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'date', 'is_reported', 'reason', 'note', 'is_notified', 'notif_counter', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "date", "is_reported", "reason", "note", "is_notified", "notif_counter", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(AttendanceTracking::class, new AttendanceTracking);
$this->assertInstanceOf(AttendanceTracking::class, new AttendanceTracking());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class AuthorizedUserTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new AuthorizedUser;
$model = new AuthorizedUser();
$this->assertSame('authorized_users', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['user_id', 'authorized_user_id', 'firstname', 'lastname', 'phone_number', 'gender', 'email', 'relation_to_user', 'token', 'status', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["user_id", "authorized_user_id", "firstname", "lastname", "phone_number", "gender", "email", "relation_to_user", "token", "status", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(AuthorizedUser::class, new AuthorizedUser);
$this->assertInstanceOf(AuthorizedUser::class, new AuthorizedUser());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class BadgePrintLogTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new BadgePrintLog;
$model = new BadgePrintLog();
$this->assertSame('badge_print_logs', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['user_id', 'printed_by', 'school_year', 'printed_at', 'role', 'class_section_name', 'copies'], $model->getFillable());
$this->assertSame(["user_id", "printed_by", "school_year", "printed_at", "role", "class_section_name", "copies"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(BadgePrintLog::class, new BadgePrintLog);
$this->assertInstanceOf(BadgePrintLog::class, new BadgePrintLog());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class CalendarTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Calendar;
$model = new Calendar();
$this->assertSame('calendar_events', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['title', 'date', 'description', 'notify_parent', 'notify_admin', 'notify_teacher', 'no_school', 'semester', 'school_year', 'notification_sent', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["title", "date", "description", "notify_parent", "notify_admin", "notify_teacher", "no_school", "semester", "school_year", "notification_sent", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Calendar::class, new Calendar);
$this->assertInstanceOf(Calendar::class, new Calendar());
}
}
@@ -9,16 +9,16 @@ class ClassPrepAdjustmentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ClassPrepAdjustment;
$model = new ClassPrepAdjustment();
$this->assertSame('class_prep_adjustments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['class_section_id', 'item_name', 'adjustment', 'adjustable', 'school_year', 'created_at'], $model->getFillable());
$this->assertSame(["class_section_id", "item_name", "adjustment", "adjustable", "school_year", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ClassPrepAdjustment::class, new ClassPrepAdjustment);
$this->assertInstanceOf(ClassPrepAdjustment::class, new ClassPrepAdjustment());
}
}
@@ -9,16 +9,16 @@ class ClassPreparationLogTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ClassPreparationLog;
$model = new ClassPreparationLog();
$this->assertSame('class_preparation_log', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['class_section_id', 'class_section', 'school_year', 'prep_data', 'created_at'], $model->getFillable());
$this->assertSame(["class_section_id", "class_section", "school_year", "prep_data", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ClassPreparationLog::class, new ClassPreparationLog);
$this->assertInstanceOf(ClassPreparationLog::class, new ClassPreparationLog());
}
}
@@ -9,16 +9,16 @@ class ClassProgressAttachmentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ClassProgressAttachment;
$model = new ClassProgressAttachment();
$this->assertSame('class_progress_attachments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['report_id', 'file_path', 'original_name', 'mime_type', 'file_size', 'created_at'], $model->getFillable());
$this->assertSame(["report_id", "file_path", "original_name", "mime_type", "file_size", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ClassProgressAttachment::class, new ClassProgressAttachment);
$this->assertInstanceOf(ClassProgressAttachment::class, new ClassProgressAttachment());
}
}
@@ -9,16 +9,16 @@ class ClassProgressReportTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ClassProgressReport;
$model = new ClassProgressReport();
$this->assertSame('class_progress_reports', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['class_section_id', 'teacher_id', 'week_start', 'week_end', 'subject', 'unit_title', 'materials', 'covered', 'homework', 'assessment', 'status', 'status_notes', 'class_notes', 'next_week_plan', 'support_needed', 'flags_json', 'attachment_path', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["class_section_id", "teacher_id", "week_start", "week_end", "subject", "unit_title", "materials", "covered", "homework", "assessment", "status", "status_notes", "class_notes", "next_week_plan", "support_needed", "flags_json", "attachment_path", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ClassProgressReport::class, new ClassProgressReport);
$this->assertInstanceOf(ClassProgressReport::class, new ClassProgressReport());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ClassSectionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ClassSection;
$model = new ClassSection();
$this->assertSame('classSection', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['class_id', 'class_section_id', 'class_section_name', 'created_at', 'updated_at', 'semester', 'school_year'], $model->getFillable());
$this->assertSame(["class_id", "class_section_id", "class_section_name", "created_at", "updated_at", "semester", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ClassSection::class, new ClassSection);
$this->assertInstanceOf(ClassSection::class, new ClassSection());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ClassTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new SchoolClass;
$model = new SchoolClass();
$this->assertSame('classes', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['class_name', 'schedule', 'capacity', 'semester', 'school_year'], $model->getFillable());
$this->assertSame(["class_name", "schedule", "capacity", "semester", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(SchoolClass::class, new SchoolClass);
$this->assertInstanceOf(SchoolClass::class, new SchoolClass());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class CommunicationLogTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new CommunicationLog;
$model = new CommunicationLog();
$this->assertSame('communication_logs', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['student_id', 'family_id', 'student_name', 'template_key', 'subject', 'body', 'recipients', 'cc', 'bcc', 'attachments', 'status', 'error_message', 'sent_by', 'metadata'], $model->getFillable());
$this->assertSame(["student_id", "family_id", "student_name", "template_key", "subject", "body", "recipients", "cc", "bcc", "attachments", "status", "error_message", "sent_by", "metadata"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(CommunicationLog::class, new CommunicationLog);
$this->assertInstanceOf(CommunicationLog::class, new CommunicationLog());
}
}
@@ -9,16 +9,16 @@ class CompetitionClassWinnerTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new CompetitionClassWinner;
$model = new CompetitionClassWinner();
$this->assertSame('competition_class_winners', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['competition_id', 'class_section_id', 'winners_override', 'created_at', 'updated_at', 'question_count', 'prize_1', 'prize_2', 'prize_3', 'prize_4', 'prize_5', 'prize_6'], $model->getFillable());
$this->assertSame(["competition_id", "class_section_id", "winners_override", "created_at", "updated_at", "question_count", "prize_1", "prize_2", "prize_3", "prize_4", "prize_5", "prize_6"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(CompetitionClassWinner::class, new CompetitionClassWinner);
$this->assertInstanceOf(CompetitionClassWinner::class, new CompetitionClassWinner());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class CompetitionScoreTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new CompetitionScore;
$model = new CompetitionScore();
$this->assertSame('competition_scores', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['competition_id', 'student_id', 'class_section_id', 'score', 'notes', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["competition_id", "student_id", "class_section_id", "score", "notes", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(CompetitionScore::class, new CompetitionScore);
$this->assertInstanceOf(CompetitionScore::class, new CompetitionScore());
}
}
+4 -4
View File
@@ -3,24 +3,24 @@
namespace Tests\Unit\Models;
use App\Models\Competition;
use Illuminate\Database\Eloquent\SoftDeletes;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class CompetitionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Competition;
$model = new Competition();
$this->assertSame('competitions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['title', 'semester', 'school_year', 'class_section_id', 'start_date', 'end_date', 'winners_count', 'prize_per_point', 'is_published', 'published_at', 'created_by', 'created_at', 'updated_at', 'deleted_at', 'is_locked', 'locked_at', 'locked_by'], $model->getFillable());
$this->assertSame(["title", "semester", "school_year", "class_section_id", "start_date", "end_date", "winners_count", "prize_per_point", "is_published", "published_at", "created_by", "created_at", "updated_at", "deleted_at", "is_locked", "locked_at", "locked_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Competition::class, new Competition);
$this->assertInstanceOf(Competition::class, new Competition());
$this->assertContains(SoftDeletes::class, class_uses_recursive(Competition::class));
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class CompetitionWinnerTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new CompetitionWinner;
$model = new CompetitionWinner();
$this->assertSame('competition_winners', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['competition_id', 'student_id', 'class_section_id', 'rank', 'score', 'prize_amount', 'created_at'], $model->getFillable());
$this->assertSame(["competition_id", "student_id", "class_section_id", "rank", "score", "prize_amount", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(CompetitionWinner::class, new CompetitionWinner);
$this->assertInstanceOf(CompetitionWinner::class, new CompetitionWinner());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ConfigurationTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Configuration;
$model = new Configuration();
$this->assertSame('configuration', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['config_key', 'config_value'], $model->getFillable());
$this->assertSame(["config_key", "config_value"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Configuration::class, new Configuration);
$this->assertInstanceOf(Configuration::class, new Configuration());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ContactUsTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ContactUs;
$model = new ContactUs();
$this->assertSame('contactus', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['sender_id', 'reciever_id', 'subject', 'message', 'created_at', 'updated_at', 'semester', 'school_year'], $model->getFillable());
$this->assertSame(["sender_id", "reciever_id", "subject", "message", "created_at", "updated_at", "semester", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ContactUs::class, new ContactUs);
$this->assertInstanceOf(ContactUs::class, new ContactUs());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class CurrentFlagTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new CurrentFlag;
$model = new CurrentFlag();
$this->assertSame('current_flag', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'student_name', 'grade', 'flag', 'flag_datetime', 'flag_state', 'updated_by_open', 'open_description', 'updated_by_closed', 'close_description', 'action_taken', 'updated_by_canceled', 'cancel_description', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "student_name", "grade", "flag", "flag_datetime", "flag_state", "updated_by_open", "open_description", "updated_by_closed", "close_description", "action_taken", "updated_by_canceled", "cancel_description", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(CurrentFlag::class, new CurrentFlag);
$this->assertInstanceOf(CurrentFlag::class, new CurrentFlag());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class DiscountUsageTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new DiscountUsage;
$model = new DiscountUsage();
$this->assertSame('discount_usages', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['voucher_id', 'invoice_id', 'parent_id', 'discount_amount', 'description', 'school_year', 'updated_by', 'used_at', 'created_at', 'updated_at', 'semester'], $model->getFillable());
$this->assertSame(["voucher_id", "invoice_id", "parent_id", "discount_amount", "description", "school_year", "updated_by", "used_at", "created_at", "updated_at", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(DiscountUsage::class, new DiscountUsage);
$this->assertInstanceOf(DiscountUsage::class, new DiscountUsage());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class DiscountVoucherTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new DiscountVoucher;
$model = new DiscountVoucher();
$this->assertSame('discount_vouchers', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['code', 'discount_type', 'description', 'discount_value', 'max_uses', 'times_used', 'valid_from', 'valid_until', 'is_active', 'created_at', 'updated_at', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["code", "discount_type", "description", "discount_value", "max_uses", "times_used", "valid_from", "valid_until", "is_active", "created_at", "updated_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(DiscountVoucher::class, new DiscountVoucher);
$this->assertInstanceOf(DiscountVoucher::class, new DiscountVoucher());
}
}
@@ -9,16 +9,16 @@ class EarlyDismissalSignatureTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new EarlyDismissalSignature;
$model = new EarlyDismissalSignature();
$this->assertSame('early_dismissal_signatures', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['report_date', 'school_year', 'semester', 'filename', 'original_name', 'mime_type', 'file_size', 'uploaded_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["report_date", "school_year", "semester", "filename", "original_name", "mime_type", "file_size", "uploaded_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(EarlyDismissalSignature::class, new EarlyDismissalSignature);
$this->assertInstanceOf(EarlyDismissalSignature::class, new EarlyDismissalSignature());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class EmergencyContactTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new EmergencyContact;
$model = new EmergencyContact();
$this->assertSame('emergency_contacts', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['emergency_contact_name', 'parent_id', 'cellphone', 'email', 'relation', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["emergency_contact_name", "parent_id", "cellphone", "email", "relation", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(EmergencyContact::class, new EmergencyContact);
$this->assertInstanceOf(EmergencyContact::class, new EmergencyContact());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class EnrollmentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Enrollment;
$model = new Enrollment();
$this->assertSame('enrollments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'class_section_id', 'parent_id', 'enrollment_date', 'enrollment_status', 'withdrawal_date', 'is_withdrawn', 'admission_status', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "class_section_id", "parent_id", "enrollment_date", "enrollment_status", "withdrawal_date", "is_withdrawn", "admission_status", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Enrollment::class, new Enrollment);
$this->assertInstanceOf(Enrollment::class, new Enrollment());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class EventChargesTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new EventCharges;
$model = new EventCharges();
$this->assertSame('event_charges', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['event_id', 'parent_id', 'student_id', 'participation', 'charged', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["event_id", "parent_id", "student_id", "participation", "charged", "semester", "school_year", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(EventCharges::class, new EventCharges);
$this->assertInstanceOf(EventCharges::class, new EventCharges());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class EventTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Event;
$model = new Event();
$this->assertSame('events', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['event_name', 'event_category', 'description', 'amount', 'flyer', 'expiration_date', 'semester', 'school_year', 'created_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["event_name", "event_category", "description", "amount", "flyer", "expiration_date", "semester", "school_year", "created_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Event::class, new Event);
$this->assertInstanceOf(Event::class, new Event());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ExamDraftTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ExamDraft;
$model = new ExamDraft();
$this->assertSame('exam_drafts', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['teacher_id', 'class_section_id', 'semester', 'school_year', 'exam_type', 'draft_title', 'description', 'teacher_file', 'teacher_filename', 'status', 'admin_id', 'admin_comments', 'reviewed_at', 'final_file', 'final_filename', 'version', 'previous_draft_id', 'is_legacy', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["teacher_id", "class_section_id", "semester", "school_year", "exam_type", "draft_title", "description", "teacher_file", "teacher_filename", "status", "admin_id", "admin_comments", "reviewed_at", "final_file", "final_filename", "version", "previous_draft_id", "is_legacy", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ExamDraft::class, new ExamDraft);
$this->assertInstanceOf(ExamDraft::class, new ExamDraft());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ExamTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Exam;
$model = new Exam();
$this->assertSame('exams', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['student_id', 'student_school_id', 'class_section_id', 'exam_name', 'created_at'], $model->getFillable());
$this->assertSame(["student_id", "student_school_id", "class_section_id", "exam_name", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Exam::class, new Exam);
$this->assertInstanceOf(Exam::class, new Exam());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ExpenseTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Expense;
$model = new Expense();
$this->assertSame('expenses', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['category', 'amount', 'receipt_path', 'description', 'retailor', 'purchased_by', 'date_of_purchase', 'added_by', 'created_at', 'updated_at', 'school_year', 'semester', 'status', 'status_reason', 'updated_by', 'approved_by', 'reimbursement_id'], $model->getFillable());
$this->assertSame(["category", "amount", "receipt_path", "description", "retailor", "purchased_by", "date_of_purchase", "added_by", "created_at", "updated_at", "school_year", "semester", "status", "status_reason", "updated_by", "approved_by", "reimbursement_id"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Expense::class, new Expense);
$this->assertInstanceOf(Expense::class, new Expense());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FamilyCommPrefTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new FamilyCommPref;
$model = new FamilyCommPref();
$this->assertSame('family_comm_prefs', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['family_id', 'category', 'via_email', 'via_sms', 'cc_all_guardians', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["family_id", "category", "via_email", "via_sms", "cc_all_guardians", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(FamilyCommPref::class, new FamilyCommPref);
$this->assertInstanceOf(FamilyCommPref::class, new FamilyCommPref());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FamilyGuardianTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new FamilyGuardian;
$model = new FamilyGuardian();
$this->assertSame('family_guardians', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['family_id', 'user_id', 'relation', 'is_primary', 'receive_emails', 'receive_sms', 'custody_notes', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["family_id", "user_id", "relation", "is_primary", "receive_emails", "receive_sms", "custody_notes", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(FamilyGuardian::class, new FamilyGuardian);
$this->assertInstanceOf(FamilyGuardian::class, new FamilyGuardian());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FamilyStudentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new FamilyStudent;
$model = new FamilyStudent();
$this->assertSame('family_students', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['family_id', 'student_id', 'is_primary_home', 'notes', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["family_id", "student_id", "is_primary_home", "notes", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(FamilyStudent::class, new FamilyStudent);
$this->assertInstanceOf(FamilyStudent::class, new FamilyStudent());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FamilyTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Family;
$model = new Family();
$this->assertSame('families', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['family_code', 'household_name', 'address_line1', 'address_line2', 'city', 'state', 'postal_code', 'country', 'primary_phone', 'preferred_lang', 'preferred_contact_method', 'is_active', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["family_code", "household_name", "address_line1", "address_line2", "city", "state", "postal_code", "country", "primary_phone", "preferred_lang", "preferred_contact_method", "is_active", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Family::class, new Family);
$this->assertInstanceOf(Family::class, new Family());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FinalExamTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new FinalExam;
$model = new FinalExam();
$this->assertSame('final_exam', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "score", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(FinalExam::class, new FinalExam);
$this->assertInstanceOf(FinalExam::class, new FinalExam());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class FinalScoreTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new FinalScore;
$model = new FinalScore();
$this->assertSame('final_score', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'score_letter', 'comment', 'school_year', 'created_at', 'updated_at', 'semester'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "score", "score_letter", "comment", "school_year", "created_at", "updated_at", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(FinalScore::class, new FinalScore);
$this->assertInstanceOf(FinalScore::class, new FinalScore());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class GradingLockTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new GradingLock;
$model = new GradingLock();
$this->assertSame('grading_locks', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['class_section_id', 'semester', 'school_year', 'is_locked', 'locked_by', 'locked_at', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["class_section_id", "semester", "school_year", "is_locked", "locked_by", "locked_at", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(GradingLock::class, new GradingLock);
$this->assertInstanceOf(GradingLock::class, new GradingLock());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class HomeworkTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Homework;
$model = new Homework();
$this->assertSame('homework', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'homework_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "homework_index", "score", "comment", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Homework::class, new Homework);
$this->assertInstanceOf(Homework::class, new Homework());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class IncidentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Incident;
$model = new Incident();
$this->assertSame('incident', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'student_name', 'grade', 'incident', 'incident_datetime', 'incident_state', 'updated_by_open', 'open_description', 'updated_by_closed', 'close_description', 'action_taken', 'updated_by_canceled', 'cancel_description', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "student_name", "grade", "incident", "incident_datetime", "incident_state", "updated_by_open", "open_description", "updated_by_closed", "close_description", "action_taken", "updated_by_canceled", "cancel_description", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Incident::class, new Incident);
$this->assertInstanceOf(Incident::class, new Incident());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InventoryCategoryTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new InventoryCategory;
$model = new InventoryCategory();
$this->assertSame('inventory_categories', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['type', 'name', 'description', 'grade_min', 'grade_max', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["type", "name", "description", "grade_min", "grade_max", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(InventoryCategory::class, new InventoryCategory);
$this->assertInstanceOf(InventoryCategory::class, new InventoryCategory());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InventoryItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new InventoryItem;
$model = new InventoryItem();
$this->assertSame('inventory_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['type', 'category_id', 'name', 'description', 'quantity', 'good_qty', 'needs_repair_qty', 'need_replace_qty', 'cannot_find_qty', 'unit', 'condition', 'isbn', 'edition', 'sku', 'notes', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["type", "category_id", "name", "description", "quantity", "good_qty", "needs_repair_qty", "need_replace_qty", "cannot_find_qty", "unit", "condition", "isbn", "edition", "sku", "notes", "semester", "school_year", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(InventoryItem::class, new InventoryItem);
$this->assertInstanceOf(InventoryItem::class, new InventoryItem());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InventoryMovementTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new InventoryMovement;
$model = new InventoryMovement();
$this->assertSame('inventory_movements', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['item_id', 'qty_change', 'movement_type', 'reason', 'note', 'semester', 'school_year', 'performed_by', 'teacher_id', 'student_id', 'class_section_id', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["item_id", "qty_change", "movement_type", "reason", "note", "semester", "school_year", "performed_by", "teacher_id", "student_id", "class_section_id", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(InventoryMovement::class, new InventoryMovement);
$this->assertInstanceOf(InventoryMovement::class, new InventoryMovement());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InvoiceEventTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new InvoiceEvent;
$model = new InvoiceEvent();
$this->assertSame('invoice_event', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['invoice_id', 'event_name', 'description', 'amount', 'semester', 'school_year', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["invoice_id", "event_name", "description", "amount", "semester", "school_year", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(InvoiceEvent::class, new InvoiceEvent);
$this->assertInstanceOf(InvoiceEvent::class, new InvoiceEvent());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InvoiceStudentListTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new InvoiceStudentList;
$model = new InvoiceStudentList();
$this->assertSame('invoice_students_list', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['invoice_id', 'student_id', 'student_firstname', 'student_lastname', 'school_id', 'enrolled', 'school_year', 'created_at', 'updated_at', 'semester'], $model->getFillable());
$this->assertSame(["invoice_id", "student_id", "student_firstname", "student_lastname", "school_id", "enrolled", "school_year", "created_at", "updated_at", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(InvoiceStudentList::class, new InvoiceStudentList);
$this->assertInstanceOf(InvoiceStudentList::class, new InvoiceStudentList());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class InvoiceTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Invoice;
$model = new Invoice();
$this->assertSame('invoices', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['parent_id', 'invoice_number', 'total_amount', 'balance', 'paid_amount', 'has_discount', 'issue_date', 'due_date', 'status', 'description', 'school_year', 'created_at', 'updated_at', 'updated_by', 'semester'], $model->getFillable());
$this->assertSame(["parent_id", "invoice_number", "total_amount", "balance", "paid_amount", "has_discount", "issue_date", "due_date", "status", "description", "school_year", "created_at", "updated_at", "updated_by", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Invoice::class, new Invoice);
$this->assertInstanceOf(Invoice::class, new Invoice());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class IpAttemptTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new IpAttempt;
$model = new IpAttempt();
$this->assertSame('ip_attempts', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['ip_address', 'attempts', 'last_attempt_at', 'blocked_until', 'created_at', 'updated_at', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["ip_address", "attempts", "last_attempt_at", "blocked_until", "created_at", "updated_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(IpAttempt::class, new IpAttempt);
$this->assertInstanceOf(IpAttempt::class, new IpAttempt());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class LateSlipLogTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new LateSlipLog;
$model = new LateSlipLog();
$this->assertSame('late_slip_logs', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['school_year', 'semester', 'student_name', 'slip_date', 'time_in', 'grade', 'reason', 'admin_name', 'printed_by', 'printed_at'], $model->getFillable());
$this->assertSame(["school_year", "semester", "student_name", "slip_date", "time_in", "grade", "reason", "admin_name", "printed_by", "printed_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(LateSlipLog::class, new LateSlipLog);
$this->assertInstanceOf(LateSlipLog::class, new LateSlipLog());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class LoginActivityTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new LoginActivity;
$model = new LoginActivity();
$this->assertSame('login_activity', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['user_id', 'email', 'login_time', 'logout_time', 'ip_address', 'user_agent', 'created_at', 'updated_at', 'semester', 'school_year'], $model->getFillable());
$this->assertSame(["user_id", "email", "login_time", "logout_time", "ip_address", "user_agent", "created_at", "updated_at", "semester", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(LoginActivity::class, new LoginActivity);
$this->assertInstanceOf(LoginActivity::class, new LoginActivity());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ManualPaymentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ManualPayment;
$model = new ManualPayment();
$this->assertSame('manual_payments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['invoice_number', 'amount', 'payment_method', 'reference', 'discount_number', 'proof_path', 'created_at', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["invoice_number", "amount", "payment_method", "reference", "discount_number", "proof_path", "created_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ManualPayment::class, new ManualPayment);
$this->assertInstanceOf(ManualPayment::class, new ManualPayment());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class MessageTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Message;
$model = new Message();
$this->assertSame('messages', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['sender_id', 'recipient_id', 'subject', 'message', 'sent_datetime', 'read_status', 'read_datetime', 'message_number', 'priority', 'attachment', 'status', 'semester', 'school_year'], $model->getFillable());
$this->assertSame(["sender_id", "recipient_id", "subject", "message", "sent_datetime", "read_status", "read_datetime", "message_number", "priority", "attachment", "status", "semester", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Message::class, new Message);
$this->assertInstanceOf(Message::class, new Message());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class MidtermExamTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new MidtermExam;
$model = new MidtermExam();
$this->assertSame('midterm_exam', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "score", "comment", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(MidtermExam::class, new MidtermExam);
$this->assertInstanceOf(MidtermExam::class, new MidtermExam());
}
}
@@ -9,16 +9,16 @@ class MissingScoreOverrideTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new MissingScoreOverride;
$model = new MissingScoreOverride();
$this->assertSame('missing_score_overrides', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'class_section_id', 'semester', 'school_year', 'item_type', 'item_index', 'is_allowed', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "class_section_id", "semester", "school_year", "item_type", "item_index", "is_allowed", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(MissingScoreOverride::class, new MissingScoreOverride);
$this->assertInstanceOf(MissingScoreOverride::class, new MissingScoreOverride());
}
}
+4 -4
View File
@@ -3,24 +3,24 @@
namespace Tests\Unit\Models;
use App\Models\NavItem;
use Illuminate\Database\Eloquent\SoftDeletes;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class NavItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new NavItem;
$model = new NavItem();
$this->assertSame('nav_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['menu_parent_id', 'label', 'url', 'icon_class', 'target', 'sort_order', 'is_enabled', 'created_at', 'updated_at', 'deleted_at'], $model->getFillable());
$this->assertSame(["menu_parent_id", "label", "url", "icon_class", "target", "sort_order", "is_enabled", "created_at", "updated_at", "deleted_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(NavItem::class, new NavItem);
$this->assertInstanceOf(NavItem::class, new NavItem());
$this->assertContains(SoftDeletes::class, class_uses_recursive(NavItem::class));
}
}
+4 -4
View File
@@ -3,24 +3,24 @@
namespace Tests\Unit\Models;
use App\Models\Notification;
use Illuminate\Database\Eloquent\SoftDeletes;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class NotificationTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Notification;
$model = new Notification();
$this->assertSame('notifications', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['title', 'message', 'target_group', 'delivery_channels', 'priority', 'status', 'action_url', 'attachment_path', 'scheduled_at', 'sent_at', 'expires_at', 'created_at', 'updated_at', 'deleted_at', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["title", "message", "target_group", "delivery_channels", "priority", "status", "action_url", "attachment_path", "scheduled_at", "sent_at", "expires_at", "created_at", "updated_at", "deleted_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Notification::class, new Notification);
$this->assertInstanceOf(Notification::class, new Notification());
$this->assertContains(SoftDeletes::class, class_uses_recursive(Notification::class));
}
}
@@ -9,16 +9,16 @@ class ParentAttendanceReportTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ParentAttendanceReport;
$model = new ParentAttendanceReport();
$this->assertSame('parent_attendance_reports', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['parent_id', 'student_id', 'class_section_id', 'report_date', 'type', 'arrival_time', 'dismiss_time', 'reason', 'semester', 'school_year', 'status', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["parent_id", "student_id", "class_section_id", "report_date", "type", "arrival_time", "dismiss_time", "reason", "semester", "school_year", "status", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ParentAttendanceReport::class, new ParentAttendanceReport);
$this->assertInstanceOf(ParentAttendanceReport::class, new ParentAttendanceReport());
}
}
@@ -9,16 +9,16 @@ class ParentMeetingScheduleTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ParentMeetingSchedule;
$model = new ParentMeetingSchedule();
$this->assertSame('parent_meeting_schedules', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'parent_user_id', 'parent_name', 'student_name', 'class_section_name', 'date', 'time', 'notes', 'semester', 'school_year', 'status', 'created_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "parent_user_id", "parent_name", "student_name", "class_section_name", "date", "time", "notes", "semester", "school_year", "status", "created_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ParentMeetingSchedule::class, new ParentMeetingSchedule);
$this->assertInstanceOf(ParentMeetingSchedule::class, new ParentMeetingSchedule());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ParentNotificationTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ParentNotification;
$model = new ParentNotification();
$this->assertSame('parent_notifications', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'code', 'incident_date', 'channel', 'to_address', 'subject', 'status', 'response', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "code", "incident_date", "channel", "to_address", "subject", "status", "response", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ParentNotification::class, new ParentNotification);
$this->assertInstanceOf(ParentNotification::class, new ParentNotification());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ParentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ParentModel;
$model = new ParentModel();
$this->assertSame('parents', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['secondparent_firstname', 'secondparent_lastname', 'secondparent_gender', 'secondparent_email', 'secondparent_phone', 'firstparent_id', 'secondparent_id', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["secondparent_firstname", "secondparent_lastname", "secondparent_gender", "secondparent_email", "secondparent_phone", "firstparent_id", "secondparent_id", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ParentModel::class, new ParentModel);
$this->assertInstanceOf(ParentModel::class, new ParentModel());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ParticipationTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Participation;
$model = new Participation();
$this->assertSame('participation', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "score", "comment", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Participation::class, new Participation);
$this->assertInstanceOf(Participation::class, new Participation());
}
}
@@ -9,16 +9,16 @@ class PasswordResetRequestTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PasswordResetRequest;
$model = new PasswordResetRequest();
$this->assertSame('password_reset_requests', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['ip_address', 'requested_at'], $model->getFillable());
$this->assertSame(["ip_address", "requested_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PasswordResetRequest::class, new PasswordResetRequest);
$this->assertInstanceOf(PasswordResetRequest::class, new PasswordResetRequest());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PasswordResetTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PasswordReset;
$model = new PasswordReset();
$this->assertSame('password_resets', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['email', 'token', 'created_at', 'expires_at'], $model->getFillable());
$this->assertSame(["email", "token", "created_at", "expires_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PasswordReset::class, new PasswordReset);
$this->assertInstanceOf(PasswordReset::class, new PasswordReset());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PayPalPaymentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PayPalPayment;
$model = new PayPalPayment();
$this->assertSame('paypal_payments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['webhook_id', 'parent_school_id', 'order_id', 'transaction_id', 'status', 'amount', 'currency', 'paypal_fee', 'net_amount', 'payer_email', 'merchant_id', 'event_type', 'summary', 'raw_payload', 'synced', 'sync_attempts', 'created_at'], $model->getFillable());
$this->assertSame(["webhook_id", "parent_school_id", "order_id", "transaction_id", "status", "amount", "currency", "paypal_fee", "net_amount", "payer_email", "merchant_id", "event_type", "summary", "raw_payload", "synced", "sync_attempts", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PayPalPayment::class, new PayPalPayment);
$this->assertInstanceOf(PayPalPayment::class, new PayPalPayment());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PaymentErrorTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PaymentError;
$model = new PaymentError();
$this->assertSame('payment_error', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['payment_id', 'invoice_id', 'parent_id', 'wrong_paid_amount', 'wrong_payment_method', 'wrong_check_file', 'error_note', 'logged_at', 'logged_by', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["payment_id", "invoice_id", "parent_id", "wrong_paid_amount", "wrong_payment_method", "wrong_check_file", "error_note", "logged_at", "logged_by", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PaymentError::class, new PaymentError);
$this->assertInstanceOf(PaymentError::class, new PaymentError());
}
}
@@ -9,16 +9,16 @@ class PaymentNotificationLogTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PaymentNotificationLog;
$model = new PaymentNotificationLog();
$this->assertSame('payment_notification_logs', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['parent_id', 'invoice_id', 'school_year', 'period_year', 'period_month', 'type', 'to_email', 'cc_email', 'head_fa_notified', 'subject', 'body', 'status', 'error_message', 'balance_snapshot', 'created_at', 'sent_at'], $model->getFillable());
$this->assertSame(["parent_id", "invoice_id", "school_year", "period_year", "period_month", "type", "to_email", "cc_email", "head_fa_notified", "subject", "body", "status", "error_message", "balance_snapshot", "created_at", "sent_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PaymentNotificationLog::class, new PaymentNotificationLog);
$this->assertInstanceOf(PaymentNotificationLog::class, new PaymentNotificationLog());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PaymentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Payment;
$model = new Payment();
$this->assertSame('payments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['parent_id', 'invoice_id', 'total_amount', 'paid_amount', 'balance', 'number_of_installments', 'transaction_id', 'check_file', 'check_number', 'payment_method', 'payment_date', 'semester', 'school_year', 'status', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["parent_id", "invoice_id", "total_amount", "paid_amount", "balance", "number_of_installments", "transaction_id", "check_file", "check_number", "payment_method", "payment_date", "semester", "school_year", "status", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Payment::class, new Payment);
$this->assertInstanceOf(Payment::class, new Payment());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PaymentTransactionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PaymentTransaction;
$model = new PaymentTransaction();
$this->assertSame('payment_transactions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['transaction_id', 'payment_id', 'transaction_date', 'amount', 'payment_method', 'payment_status', 'transaction_fee', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["transaction_id", "payment_id", "transaction_date", "amount", "payment_method", "payment_status", "transaction_fee", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PaymentTransaction::class, new PaymentTransaction);
$this->assertInstanceOf(PaymentTransaction::class, new PaymentTransaction());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PaypalTransactionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PaypalTransaction;
$model = new PaypalTransaction();
$this->assertSame('paypal_transactions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['transaction_id', 'payment_id', 'firstname', 'lastname', 'event_type', 'payer_email', 'amount', 'currency', 'status', 'payment_method', 'transaction_fee', 'raw_data', 'created_at', 'updated_at', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["transaction_id", "payment_id", "firstname", "lastname", "event_type", "payer_email", "amount", "currency", "status", "payment_method", "transaction_fee", "raw_data", "created_at", "updated_at", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PaypalTransaction::class, new PaypalTransaction);
$this->assertInstanceOf(PaypalTransaction::class, new PaypalTransaction());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PermissionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Permission;
$model = new Permission();
$this->assertSame('permissions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['name', 'description', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["name", "description", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Permission::class, new Permission);
$this->assertInstanceOf(Permission::class, new Permission());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PlacementBatchTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PlacementBatch;
$model = new PlacementBatch();
$this->assertSame('placement_batches', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['placement_test', 'school_year', 'created_by', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["placement_test", "school_year", "created_by", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PlacementBatch::class, new PlacementBatch);
$this->assertInstanceOf(PlacementBatch::class, new PlacementBatch());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PlacementLevelTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PlacementLevel;
$model = new PlacementLevel();
$this->assertSame('placement_levels', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'level', 'school_year', 'created_by', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "level", "school_year", "created_by", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PlacementLevel::class, new PlacementLevel);
$this->assertInstanceOf(PlacementLevel::class, new PlacementLevel());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PlacementScoreTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PlacementScore;
$model = new PlacementScore();
$this->assertSame('placement_scores', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['batch_id', 'student_id', 'score', 'created_by', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["batch_id", "student_id", "score", "created_by", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PlacementScore::class, new PlacementScore);
$this->assertInstanceOf(PlacementScore::class, new PlacementScore());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PreferencesTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Preferences;
$model = new Preferences();
$this->assertSame('user_preferences', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['user_id', 'notification_email', 'notification_sms', 'theme', 'language', 'style_color', 'menu_color', 'menu_custom_bg', 'menu_custom_text', 'menu_custom_mode', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["user_id", "notification_email", "notification_sms", "theme", "language", "style_color", "menu_color", "menu_custom_bg", "menu_custom_text", "menu_custom_mode", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Preferences::class, new Preferences);
$this->assertInstanceOf(Preferences::class, new Preferences());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PrintRequestTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PrintRequest;
$model = new PrintRequest();
$this->assertSame('print_requests', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['teacher_id', 'admin_id', 'class_id', 'file_path', 'page_selection', 'num_copies', 'required_by', 'pickup_method', 'status', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["teacher_id", "admin_id", "class_id", "file_path", "page_selection", "num_copies", "required_by", "pickup_method", "status", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PrintRequest::class, new PrintRequest);
$this->assertInstanceOf(PrintRequest::class, new PrintRequest());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ProjectTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Project;
$model = new Project();
$this->assertSame('project', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'project_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "project_index", "score", "comment", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Project::class, new Project);
$this->assertInstanceOf(Project::class, new Project());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PromotionQueueTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PromotionQueue;
$model = new PromotionQueue();
$this->assertSame('promotion_queue', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'from_class_section_id', 'to_class_id', 'to_class_section_id', 'school_year_from', 'school_year_to', 'status', 'created_at', 'updated_at', 'updated_by'], $model->getFillable());
$this->assertSame(["student_id", "from_class_section_id", "to_class_id", "to_class_section_id", "school_year_from", "school_year_to", "status", "created_at", "updated_at", "updated_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PromotionQueue::class, new PromotionQueue);
$this->assertInstanceOf(PromotionQueue::class, new PromotionQueue());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class PurchaseOrderItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PurchaseOrderItem;
$model = new PurchaseOrderItem();
$this->assertSame('purchase_order_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['purchase_order_id', 'supply_id', 'description', 'quantity', 'received_qty', 'unit_cost'], $model->getFillable());
$this->assertSame(["purchase_order_id", "supply_id", "description", "quantity", "received_qty", "unit_cost"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PurchaseOrderItem::class, new PurchaseOrderItem);
$this->assertInstanceOf(PurchaseOrderItem::class, new PurchaseOrderItem());
}
}
+4 -4
View File
@@ -3,24 +3,24 @@
namespace Tests\Unit\Models;
use App\Models\PurchaseOrder;
use Illuminate\Database\Eloquent\SoftDeletes;
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Eloquent\SoftDeletes;
class PurchaseOrderTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new PurchaseOrder;
$model = new PurchaseOrder();
$this->assertSame('purchase_orders', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['po_number', 'supplier_id', 'status', 'order_date', 'expected_date', 'subtotal', 'tax', 'total', 'notes'], $model->getFillable());
$this->assertSame(["po_number", "supplier_id", "status", "order_date", "expected_date", "subtotal", "tax", "total", "notes"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(PurchaseOrder::class, new PurchaseOrder);
$this->assertInstanceOf(PurchaseOrder::class, new PurchaseOrder());
$this->assertContains(SoftDeletes::class, class_uses_recursive(PurchaseOrder::class));
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class QuizTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Quiz;
$model = new Quiz();
$this->assertSame('quiz', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'quiz_index', 'score', 'comment', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "quiz_index", "score", "comment", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Quiz::class, new Quiz);
$this->assertInstanceOf(Quiz::class, new Quiz());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class RefundTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Refund;
$model = new Refund();
$this->assertSame('refunds', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['parent_id', 'school_year', 'invoice_id', 'refund_amount', 'requested_at', 'approved_at', 'refunded_at', 'status', 'reason', 'refund_paid_amount', 'request', 'note', 'approved_by', 'updated_by', 'refund_method', 'check_nbr', 'check_file', 'created_at', 'updated_at', 'semester'], $model->getFillable());
$this->assertSame(["parent_id", "school_year", "invoice_id", "refund_amount", "requested_at", "approved_at", "refunded_at", "status", "reason", "refund_paid_amount", "request", "note", "approved_by", "updated_by", "refund_method", "check_nbr", "check_file", "created_at", "updated_at", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Refund::class, new Refund);
$this->assertInstanceOf(Refund::class, new Refund());
}
}
@@ -9,16 +9,16 @@ class ReimbursementBatchAdminFileTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ReimbursementBatchAdminFile;
$model = new ReimbursementBatchAdminFile();
$this->assertSame('reimbursement_batch_admin_files', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['batch_id', 'admin_id', 'filename', 'original_filename', 'uploaded_at', 'uploaded_by'], $model->getFillable());
$this->assertSame(["batch_id", "admin_id", "filename", "original_filename", "uploaded_at", "uploaded_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ReimbursementBatchAdminFile::class, new ReimbursementBatchAdminFile);
$this->assertInstanceOf(ReimbursementBatchAdminFile::class, new ReimbursementBatchAdminFile());
}
}
@@ -9,16 +9,16 @@ class ReimbursementBatchItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ReimbursementBatchItem;
$model = new ReimbursementBatchItem();
$this->assertSame('reimbursement_batch_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['batch_id', 'expense_id', 'reimbursement_id', 'admin_id', 'assigned_at', 'unassigned_at', 'notes', 'school_year', 'semester'], $model->getFillable());
$this->assertSame(["batch_id", "expense_id", "reimbursement_id", "admin_id", "assigned_at", "unassigned_at", "notes", "school_year", "semester"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ReimbursementBatchItem::class, new ReimbursementBatchItem);
$this->assertInstanceOf(ReimbursementBatchItem::class, new ReimbursementBatchItem());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ReimbursementBatchTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ReimbursementBatch;
$model = new ReimbursementBatch();
$this->assertSame('reimbursement_batches', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['title', 'yearly_batch_number', 'status', 'school_year', 'semester', 'created_by', 'closed_by', 'opened_at', 'closed_at', 'notes'], $model->getFillable());
$this->assertSame(["title", "yearly_batch_number", "status", "school_year", "semester", "created_by", "closed_by", "opened_at", "closed_at", "notes"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ReimbursementBatch::class, new ReimbursementBatch);
$this->assertInstanceOf(ReimbursementBatch::class, new ReimbursementBatch());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ReimbursementTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Reimbursement;
$model = new Reimbursement();
$this->assertSame('reimbursements', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['expense_id', 'amount', 'reimbursed_to', 'approved_by', 'receipt_path', 'description', 'status', 'added_by', 'created_at', 'updated_at', 'school_year', 'semester', 'check_number', 'reimbursement_method', 'batch_number'], $model->getFillable());
$this->assertSame(["expense_id", "amount", "reimbursed_to", "approved_by", "receipt_path", "description", "status", "added_by", "created_at", "updated_at", "school_year", "semester", "check_number", "reimbursement_method", "batch_number"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Reimbursement::class, new Reimbursement);
$this->assertInstanceOf(Reimbursement::class, new Reimbursement());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class RoleNavItemTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new RoleNavItem;
$model = new RoleNavItem();
$this->assertSame('role_nav_items', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['role_id', 'nav_item_id', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["role_id", "nav_item_id", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(RoleNavItem::class, new RoleNavItem);
$this->assertInstanceOf(RoleNavItem::class, new RoleNavItem());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class RolePermissionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new RolePermission;
$model = new RolePermission();
$this->assertSame('role_permissions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['role_id', 'permission_id', 'can_create', 'can_read', 'can_update', 'can_delete', 'can_manage', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["role_id", "permission_id", "can_create", "can_read", "can_update", "can_delete", "can_manage", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(RolePermission::class, new RolePermission);
$this->assertInstanceOf(RolePermission::class, new RolePermission());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class RoleTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Role;
$model = new Role();
$this->assertSame('roles', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['name', 'slug', 'description', 'dashboard_route', 'priority', 'is_active', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["name", "slug", "description", "dashboard_route", "priority", "is_active", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Role::class, new Role);
$this->assertInstanceOf(Role::class, new Role());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class ScoreCommentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new ScoreComment;
$model = new ScoreComment();
$this->assertSame('score_comments', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['student_id', 'class_section_id', 'score_type', 'semester', 'school_year', 'comment', 'comment_review', 'reviewed_by', 'commented_by', 'created_at'], $model->getFillable());
$this->assertSame(["student_id", "class_section_id", "score_type", "semester", "school_year", "comment", "comment_review", "reviewed_by", "commented_by", "created_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(ScoreComment::class, new ScoreComment);
$this->assertInstanceOf(ScoreComment::class, new ScoreComment());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class SectionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Section;
$model = new Section();
$this->assertSame('sections', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['section_name', 'description', 'updated_at', 'updated_by'], $model->getFillable());
$this->assertSame(["section_name", "description", "updated_at", "updated_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Section::class, new Section);
$this->assertInstanceOf(Section::class, new Section());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class SemesterScoreTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new SemesterScore;
$model = new SemesterScore();
$this->assertSame('semester_scores', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'school_id', 'class_section_id', 'updated_by', 'homework_avg', 'quiz_avg', 'project_avg', 'midterm_exam_score', 'final_exam_score', 'attendance_score', 'participation_score', 'ptap_score', 'test_avg', 'semester_score', 'semester', 'school_year', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["student_id", "school_id", "class_section_id", "updated_by", "homework_avg", "quiz_avg", "project_avg", "midterm_exam_score", "final_exam_score", "attendance_score", "participation_score", "ptap_score", "test_avg", "semester_score", "semester", "school_year", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(SemesterScore::class, new SemesterScore);
$this->assertInstanceOf(SemesterScore::class, new SemesterScore());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class SettingsTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Setting;
$model = new Setting();
$this->assertSame('settings', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['name', 'timezone', 'updated_by', 'created_at', 'updated_at'], $model->getFillable());
$this->assertSame(["name", "timezone", "updated_by", "created_at", "updated_at"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Setting::class, new Setting);
$this->assertInstanceOf(Setting::class, new Setting());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StaffAttendanceTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new StaffAttendance;
$model = new StaffAttendance();
$this->assertSame('staff_attendance', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['user_id', 'role_name', 'date', 'semester', 'school_year', 'status', 'reason', 'created_at', 'updated_at', 'created_by', 'updated_by'], $model->getFillable());
$this->assertSame(["user_id", "role_name", "date", "semester", "school_year", "status", "reason", "created_at", "updated_at", "created_by", "updated_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(StaffAttendance::class, new StaffAttendance);
$this->assertInstanceOf(StaffAttendance::class, new StaffAttendance());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StaffTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Staff;
$model = new Staff();
$this->assertSame('staff', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['firstname', 'lastname', 'email', 'phone', 'role_name', 'school_year', 'active_role', 'created_at', 'updated_at', 'user_id'], $model->getFillable());
$this->assertSame(["firstname", "lastname", "email", "phone", "role_name", "school_year", "active_role", "created_at", "updated_at", "user_id"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Staff::class, new Staff);
$this->assertInstanceOf(Staff::class, new Staff());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StatsTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Stats;
$model = new Stats();
$this->assertSame('stats', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['students', 'teachers', 'admins', 'users'], $model->getFillable());
$this->assertSame(["students", "teachers", "admins", "users"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Stats::class, new Stats);
$this->assertInstanceOf(Stats::class, new Stats());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StudentAllergyTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new StudentAllergy;
$model = new StudentAllergy();
$this->assertSame('student_allergies', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['student_id', 'allergy'], $model->getFillable());
$this->assertSame(["student_id", "allergy"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(StudentAllergy::class, new StudentAllergy);
$this->assertInstanceOf(StudentAllergy::class, new StudentAllergy());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StudentClassTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new StudentClass;
$model = new StudentClass();
$this->assertSame('student_class', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(true, $model->timestamps);
$this->assertSame(['student_id', 'class_section_id', 'is_event_only', 'semester', 'school_year', 'description', 'created_at', 'updated_at', 'updated_by'], $model->getFillable());
$this->assertSame(["student_id", "class_section_id", "is_event_only", "semester", "school_year", "description", "created_at", "updated_at", "updated_by"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(StudentClass::class, new StudentClass);
$this->assertInstanceOf(StudentClass::class, new StudentClass());
}
}
@@ -9,16 +9,16 @@ class StudentMedicalConditionTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new StudentMedicalCondition;
$model = new StudentMedicalCondition();
$this->assertSame('student_medical_conditions', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['student_id', 'condition_name'], $model->getFillable());
$this->assertSame(["student_id", "condition_name"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(StudentMedicalCondition::class, new StudentMedicalCondition);
$this->assertInstanceOf(StudentMedicalCondition::class, new StudentMedicalCondition());
}
}
+3 -3
View File
@@ -9,16 +9,16 @@ class StudentTest extends TestCase
{
public function test_model_metadata_is_converted(): void
{
$model = new Student;
$model = new Student();
$this->assertSame('students', $model->getTable());
$this->assertSame('id', $model->getKeyName());
$this->assertSame(false, $model->timestamps);
$this->assertSame(['school_id', 'firstname', 'lastname', 'dob', 'age', 'gender', 'is_active', 'registration_grade', 'is_new', 'photo_consent', 'parent_id', 'registration_date', 'tuition_paid', 'rfid_tag', 'semester', 'year_of_registration', 'school_year'], $model->getFillable());
$this->assertSame(["school_id", "firstname", "lastname", "dob", "age", "gender", "is_active", "registration_grade", "is_new", "photo_consent", "parent_id", "registration_date", "tuition_paid", "rfid_tag", "semester", "year_of_registration", "school_year"], $model->getFillable());
}
public function test_model_class_loads(): void
{
$this->assertInstanceOf(Student::class, new Student);
$this->assertInstanceOf(Student::class, new Student());
}
}

Some files were not shown because too many files have changed in this diff Show More