fix payments
This commit is contained in:
@@ -25,6 +25,26 @@ class TestableFinancialSystemLedgerCleanup extends FinancialSystemLedgerCleanup
|
||||
$this->calls[] = 'ensureIndexes';
|
||||
}
|
||||
|
||||
protected function backfillInstallmentSequence(): void
|
||||
{
|
||||
$this->calls[] = 'backfillInstallmentSequence';
|
||||
}
|
||||
|
||||
protected function ensurePaymentDateHasTime(): void
|
||||
{
|
||||
$this->calls[] = 'ensurePaymentDateHasTime';
|
||||
}
|
||||
|
||||
protected function repairPaymentInvoiceTerms(): void
|
||||
{
|
||||
$this->calls[] = 'repairPaymentInvoiceTerms';
|
||||
}
|
||||
|
||||
protected function normalizePaymentStatuses(): void
|
||||
{
|
||||
$this->calls[] = 'normalizePaymentStatuses';
|
||||
}
|
||||
|
||||
protected function ensureConfigurationDefaults(): void
|
||||
{
|
||||
$this->calls[] = 'ensureConfigurationDefaults';
|
||||
@@ -61,7 +81,11 @@ class FinancialSystemLedgerCleanupTest extends CIUnitTestCase
|
||||
|
||||
$this->assertSame([
|
||||
'addInstallmentSequenceColumn',
|
||||
'backfillInstallmentSequence',
|
||||
'ensurePaymentDateHasTime',
|
||||
'ensureIndexes',
|
||||
'repairPaymentInvoiceTerms',
|
||||
'normalizePaymentStatuses',
|
||||
'ensureConfigurationDefaults',
|
||||
'archivePaypalTables',
|
||||
'refreshFinancialNavItems',
|
||||
|
||||
@@ -11,9 +11,14 @@ class PaymentModelMetadataTest extends CIUnitTestCase
|
||||
{
|
||||
$model = new PaymentModel();
|
||||
$fields = self::getPrivateProperty($model, 'allowedFields');
|
||||
$columns = self::getPrivateProperty($model, 'paymentColumns');
|
||||
|
||||
$this->assertContains('installment_seq', $fields);
|
||||
$this->assertContains('transaction_id', $fields);
|
||||
$this->assertContains('check_file', $fields);
|
||||
foreach (['installment_seq', 'transaction_id', 'check_file'] as $field) {
|
||||
if (in_array($field, $columns, true)) {
|
||||
$this->assertContains($field, $fields);
|
||||
} else {
|
||||
$this->assertNotContains($field, $fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user