Skip to content

Commit 289c1fa

Browse files
committed
test(policy): register footer policy in registry
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 96ad8bc commit 289c1fa

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/php/Unit/Service/Policy/Runtime/PolicyRegistryTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use OCA\Libresign\Service\Policy\Model\PolicyContext;
1414
use OCA\Libresign\Service\Policy\Model\PolicySpec;
1515
use OCA\Libresign\Service\Policy\Provider\DocMdp\DocMdpPolicy;
16-
use OCA\Libresign\Service\Policy\Provider\Footer\AddFooterPolicy;
17-
use OCA\Libresign\Service\Policy\Provider\Footer\SignatureFooterPolicyValue;
16+
use OCA\Libresign\Service\Policy\Provider\Footer\FooterPolicy;
17+
use OCA\Libresign\Service\Policy\Provider\Footer\FooterPolicyValue;
1818
use OCA\Libresign\Service\Policy\Provider\Signature\SignatureFlowPolicy;
1919
use OCA\Libresign\Service\Policy\Runtime\PolicyRegistry;
2020
use PHPUnit\Framework\TestCase;
@@ -45,20 +45,20 @@ public function testRegistryReturnsDocMdpDefinition(): void {
4545
$this->assertSame(2, $definition->normalizeValue(2));
4646
}
4747

48-
public function testRegistryReturnsAddFooterDefinition(): void {
48+
public function testRegistryReturnsFooterDefinition(): void {
4949
$container = $this->createMock(ContainerInterface::class);
50-
$container->method('get')->with(AddFooterPolicy::class)->willReturn(new AddFooterPolicy());
50+
$container->method('get')->with(FooterPolicy::class)->willReturn(new FooterPolicy());
5151
$registry = new PolicyRegistry($container);
52-
$definition = $registry->get(AddFooterPolicy::KEY);
52+
$definition = $registry->get(FooterPolicy::KEY);
5353

54-
$this->assertSame(AddFooterPolicy::KEY, $definition->key());
54+
$this->assertSame(FooterPolicy::KEY, $definition->key());
5555
$this->assertSame(
56-
SignatureFooterPolicyValue::encode(SignatureFooterPolicyValue::defaults()),
56+
FooterPolicyValue::encode(FooterPolicyValue::defaults()),
5757
$definition->defaultSystemValue(),
5858
);
5959
$this->assertSame([], $definition->allowedValues(new PolicyContext()));
6060
$this->assertSame(
61-
SignatureFooterPolicyValue::encode([
61+
FooterPolicyValue::encode([
6262
'enabled' => false,
6363
'writeQrcodeOnFooter' => true,
6464
'validationSite' => '',

0 commit comments

Comments
 (0)