18 lines
519 B
PHP
18 lines
519 B
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use App\Support\SensitiveData;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class SensitiveDataTest extends TestCase
|
|
{
|
|
public function test_sensitive_data_masking(): void
|
|
{
|
|
$this->assertSame('9001****5555', SensitiveData::maskIc('900101105555'));
|
|
$this->assertSame('123***7890', SensitiveData::maskAccount('1234567890'));
|
|
$this->assertSame('012****789', SensitiveData::maskPhone('0123456789'));
|
|
$this->assertSame('-', SensitiveData::maskAccount(null));
|
|
}
|
|
}
|