File tree Expand file tree Collapse file tree
tests/php/Unit/Service/Policy/Provider/LegalInformation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+ /**
5+ * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
6+ * SPDX-License-Identifier: AGPL-3.0-or-later
7+ */
8+
9+ namespace OCA \Libresign \Tests \Unit \Service \Policy \Provider \LegalInformation ;
10+
11+ use OCA \Libresign \Service \Policy \Provider \LegalInformation \LegalInformationPolicy ;
12+ use PHPUnit \Framework \TestCase ;
13+
14+ final class LegalInformationPolicyTest extends TestCase {
15+ public function testProviderBuildsDefinition (): void {
16+ $ provider = new LegalInformationPolicy ();
17+ $ this ->assertSame ([LegalInformationPolicy::KEY ], $ provider ->keys ());
18+
19+ $ definition = $ provider ->get (LegalInformationPolicy::KEY );
20+ $ this ->assertSame (LegalInformationPolicy::KEY , $ definition ->key ());
21+ $ this ->assertSame ('' , $ definition ->defaultSystemValue ());
22+ }
23+
24+ public function testNormalizesMarkdownAsString (): void {
25+ $ provider = new LegalInformationPolicy ();
26+ $ definition = $ provider ->get (LegalInformationPolicy::KEY );
27+
28+ $ this ->assertSame ('**Legal** _terms_ ' , $ definition ->normalizeValue ('**Legal** _terms_ ' ));
29+ $ this ->assertSame ('42 ' , $ definition ->normalizeValue (42 ));
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments