assertSame('5678', FinanceLedgerAccountType::last4($type, '6222-1234 5678', '0000')); } } public function test_alipay_always_uses_a_slash(): void { $this->assertSame('/', FinanceLedgerAccountType::last4('支付宝', 'alipay@example.com', '1234')); } public function test_other_types_keep_the_fallback_when_no_bank_last_four_can_be_derived(): void { $this->assertSame('1234', FinanceLedgerAccountType::last4('其他', 'alipay@example.com', '1234')); $this->assertSame('/', FinanceLedgerAccountType::last4('公户', '123', '')); } public function test_only_public_accounts_follow_company_plan_while_personal_cards_are_always_retained(): void { $this->assertTrue(FinanceLedgerAccountType::companyPlanDrivesKeep('公户')); $this->assertFalse(FinanceLedgerAccountType::companyPlanDrivesKeep('个人卡')); $this->assertFalse(FinanceLedgerAccountType::companyPlanDrivesKeep('支付宝')); $this->assertFalse(FinanceLedgerAccountType::companyPlanDrivesKeep('网商银行')); $this->assertTrue(FinanceLedgerAccountType::isAlwaysRetained('个人卡')); $this->assertFalse(FinanceLedgerAccountType::isAlwaysRetained('公户')); } }