|
14 | 14 | use OCA\Libresign\Service\Policy\Model\PolicySpec; |
15 | 15 | use OCA\Libresign\Service\Policy\Provider\DocMdp\DocMdpPolicy; |
16 | 16 | use OCA\Libresign\Service\Policy\Provider\Footer\AddFooterPolicy; |
| 17 | +use OCA\Libresign\Service\Policy\Provider\Footer\SignatureFooterPolicyValue; |
17 | 18 | use OCA\Libresign\Service\Policy\Provider\Signature\SignatureFlowPolicy; |
18 | 19 | use OCA\Libresign\Service\Policy\Runtime\PolicyRegistry; |
19 | 20 | use PHPUnit\Framework\TestCase; |
@@ -51,9 +52,20 @@ public function testRegistryReturnsAddFooterDefinition(): void { |
51 | 52 | $definition = $registry->get(AddFooterPolicy::KEY); |
52 | 53 |
|
53 | 54 | $this->assertSame(AddFooterPolicy::KEY, $definition->key()); |
54 | | - $this->assertTrue($definition->defaultSystemValue()); |
55 | | - $this->assertSame([true, false], $definition->allowedValues(new PolicyContext())); |
56 | | - $this->assertFalse($definition->normalizeValue('0')); |
| 55 | + $this->assertSame( |
| 56 | + SignatureFooterPolicyValue::encode(SignatureFooterPolicyValue::defaults()), |
| 57 | + $definition->defaultSystemValue(), |
| 58 | + ); |
| 59 | + $this->assertSame([], $definition->allowedValues(new PolicyContext())); |
| 60 | + $this->assertSame( |
| 61 | + SignatureFooterPolicyValue::encode([ |
| 62 | + 'enabled' => false, |
| 63 | + 'writeQrcodeOnFooter' => true, |
| 64 | + 'validationSite' => '', |
| 65 | + 'customizeFooterTemplate' => false, |
| 66 | + ]), |
| 67 | + $definition->normalizeValue('0'), |
| 68 | + ); |
57 | 69 | } |
58 | 70 |
|
59 | 71 |
|
|
0 commit comments