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', '')); } }