-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathConstantAnonymizerTest.php
More file actions
41 lines (34 loc) · 1.1 KB
/
ConstantAnonymizerTest.php
File metadata and controls
41 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
namespace MakinaCorpus\DbToolsBundle\Tests\Unit\Anonymization\Anonymizer\Core;
use MakinaCorpus\DbToolsBundle\Anonymization\Anonymizer\Context;
use MakinaCorpus\DbToolsBundle\Anonymization\Anonymizer\Core\ConstantAnonymizer;
use MakinaCorpus\DbToolsBundle\Anonymization\Anonymizer\Options;
use MakinaCorpus\DbToolsBundle\Test\UnitTestCase;
class ConstantAnonymizerTest extends UnitTestCase
{
public function testValidateOptionsOkWithValueOption(): void
{
new ConstantAnonymizer(
'some_table',
'some_column',
$this->getDatabaseSession(),
new Context(),
new Options([
'value' => 'test',
]),
);
self::expectNotToPerformAssertions();
}
public function testValidateOptionsKoWithValueOption(): void
{
self::expectExceptionMessageMatches("@required@");
new ConstantAnonymizer(
'some_table',
'some_column',
$this->getDatabaseSession(),
new Context(),
new Options([]),
);
}
}