37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use App\Utilities\FinanceLedgerAccountShouldKeep;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class FinanceLedgerAccountShouldKeepTest extends TestCase
|
|
{
|
|
public function test_company_plan_not_retained_defaults_to_temporary_retention(): void
|
|
{
|
|
$this->assertSame(
|
|
FinanceLedgerAccountShouldKeep::TEMPORARY,
|
|
FinanceLedgerAccountShouldKeep::display(null, '不保留'),
|
|
);
|
|
$this->assertSame('暂时保留', FinanceLedgerAccountShouldKeep::label(null, '不保留'));
|
|
}
|
|
|
|
public function test_explicit_not_retained_overrides_company_plan(): void
|
|
{
|
|
$this->assertSame(
|
|
FinanceLedgerAccountShouldKeep::NO,
|
|
FinanceLedgerAccountShouldKeep::display('否', '不保留'),
|
|
);
|
|
$this->assertSame('不保留', FinanceLedgerAccountShouldKeep::label('否', '不保留'));
|
|
}
|
|
|
|
public function test_temporary_retention_remains_a_retained_state(): void
|
|
{
|
|
$this->assertSame(
|
|
FinanceLedgerAccountShouldKeep::TEMPORARY,
|
|
FinanceLedgerAccountShouldKeep::normalize('暂时保留'),
|
|
);
|
|
$this->assertSame('暂时保留', FinanceLedgerAccountShouldKeep::label('暂时保留', '保留'));
|
|
}
|
|
}
|