19 lines
607 B
PHP
19 lines
607 B
PHP
<?php
|
|
|
|
use AKSRT\Payment\Withdrawal;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class WithdrawalTest extends TestCase {
|
|
public function test_admin_account_display_keeps_the_full_account(): void {
|
|
$method = new ReflectionMethod(Withdrawal::class, 'normalize_row');
|
|
$row = $method->invoke(Withdrawal::get_instance(), [
|
|
'account_info' => wp_json_encode(['account' => '账户名称 账户号码']),
|
|
'gross_amount' => '100.00',
|
|
'amount' => '95.00',
|
|
]);
|
|
|
|
self::assertSame('账户名称 账户号码', $row['display_account']);
|
|
self::assertSame(1, preg_match('//u', $row['display_account']));
|
|
}
|
|
}
|