feat: initial commit

This commit is contained in:
2025-07-28 15:00:37 +03:00
commit 8c67190431
38 changed files with 8541 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace Tests;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\TestCase;
use Ivuorinen\MonologGdprFilter\FieldMaskConfig;
#[CoversClass(className: FieldMaskConfig::class)]
#[CoversMethod(className: FieldMaskConfig::class, methodName: '__construct')]
class FieldMaskConfigTest extends TestCase
{
public function testMaskRegexConfig(): void
{
$config = new FieldMaskConfig(FieldMaskConfig::MASK_REGEX);
$this->assertSame(FieldMaskConfig::MASK_REGEX, $config->type);
$this->assertNull($config->replacement);
}
public function testRemoveConfig(): void
{
$config = new FieldMaskConfig(FieldMaskConfig::REMOVE);
$this->assertSame(FieldMaskConfig::REMOVE, $config->type);
$this->assertNull($config->replacement);
}
public function testReplaceConfig(): void
{
$config = new FieldMaskConfig(FieldMaskConfig::REPLACE, 'MASKED');
$this->assertSame(FieldMaskConfig::REPLACE, $config->type);
$this->assertSame('MASKED', $config->replacement);
}
}