forked from ReimuHakurei/phpPgAdmin
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValueObjectsTest.php
More file actions
27 lines (23 loc) · 653 Bytes
/
Copy pathValueObjectsTest.php
File metadata and controls
27 lines (23 loc) · 653 Bytes
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
<?php
declare(strict_types=1);
namespace Tests\Architecture\DDD;
use PHPat\Selector\Selector;
use PHPat\Test\Attributes\TestRule;
use PHPat\Test\Builder\Rule;
use PHPat\Test\PHPat;
final class ValueObjectsTest
{
#[TestRule]
public function testValueObjectsAreReadonly(): Rule
{
return PHPat::rule()
->classes(
Selector::AllOf(
Selector::inNamespace('PhpPgAdmin\DDD\ValueObjects'),
Selector::Not(Selector::isEnum()),
)
)
->should()->beReadonly()
->because('ValueObjects are immutable by definition.');
}
}