0ac3a8375e
- load global semester helpers consistently and use date-based semester defaults - fix grading and daily attendance duplicate student/section rows - keep attendance violations scoped to the current semester by default - update invoice, refund, discount, payment, and financial aid flows - add configuration cleanup migrations for duplicate calendar/semester keys - refresh parent registration/report-card and print request handling - update related models, services, views, cron notes, and test coverage
26 lines
654 B
PHP
26 lines
654 B
PHP
<?php
|
|
|
|
namespace Tests\App\Models;
|
|
|
|
use App\Models\ManualPaymentModel;
|
|
use CodeIgniter\Test\CIUnitTestCase;
|
|
|
|
class ManualPaymentModelMetadataTest extends CIUnitTestCase
|
|
{
|
|
public function testAllowedFieldsOnlyIncludeExistingColumns(): void
|
|
{
|
|
$model = new ManualPaymentModel();
|
|
$fields = self::getPrivateProperty($model, 'allowedFields');
|
|
$columns = self::getPrivateProperty($model, 'manualPaymentColumns');
|
|
|
|
if ($columns === []) {
|
|
$this->assertSame([], $fields);
|
|
return;
|
|
}
|
|
|
|
foreach ($fields as $field) {
|
|
$this->assertContains($field, $columns);
|
|
}
|
|
}
|
|
}
|