按店铺平台及三家指定天猫店铺配置提现预留标准。 Co-authored-by: 92451 <924518135@qq.com> Co-committed-by: 92451 <924518135@qq.com>
44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\Business;
|
|
|
|
use App\Business\WithdrawalReserveStandard;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class WithdrawalReserveStandardTest extends TestCase
|
|
{
|
|
public function test_special_tmall_stores_use_fifty_thousand_reserve(): void
|
|
{
|
|
foreach ([
|
|
'天猫-亿家达旗舰店',
|
|
'天猫-欧意朗旗舰店 ',
|
|
'天猫-卓禾家具旗舰店',
|
|
] as $storeName) {
|
|
$this->assertSame(50000, WithdrawalReserveStandard::amountFor('天猫', $storeName));
|
|
}
|
|
}
|
|
|
|
public function test_platform_defaults_are_applied(): void
|
|
{
|
|
$expected = [
|
|
'天猫' => 20000,
|
|
'淘宝' => 10000,
|
|
'淘宝分销' => 10000,
|
|
'阿里巴巴' => 10000,
|
|
'京东' => 5000,
|
|
'京喜' => 5000,
|
|
'抖音' => 5000,
|
|
'拼多多' => 5000,
|
|
];
|
|
|
|
foreach ($expected as $platform => $amount) {
|
|
$this->assertSame($amount, WithdrawalReserveStandard::amountFor($platform, '普通店铺'));
|
|
}
|
|
}
|
|
|
|
public function test_unconfigured_platform_has_no_invented_standard(): void
|
|
{
|
|
$this->assertNull(WithdrawalReserveStandard::amountFor('唯品会', '唯品会-测试店铺'));
|
|
}
|
|
}
|