File tree Expand file tree Collapse file tree
Handler/CertificateEngine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111use RuntimeException ;
1212
1313class FooterStampUnavailableException extends RuntimeException {
14- }
14+ }
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ public function testSetEngineConfiguresIdentifyMethodsForNoneEngine(
118118 'enabled ' => true ,
119119 'mandatory ' => true ,
120120 'signatureMethods ' => [],
121+ 'friendly_name ' => 'Account ' ,
121122 ]];
122123
123124 $ this ->assertEquals (
Original file line number Diff line number Diff line change 1515use OCA \Libresign \Db \PermissionSetBindingMapper ;
1616use OCA \Libresign \Db \PermissionSetMapper ;
1717use OCA \Libresign \Service \Policy \Model \PolicyContext ;
18+ use OCA \Libresign \Service \IdentifyMethodService ;
1819use OCA \Libresign \Service \Policy \Provider \ApprovalGroups \ApprovalGroupsPolicy ;
1920use OCA \Libresign \Service \Policy \Provider \DocMdp \DocMdpPolicy ;
21+ use OCA \Libresign \Service \Policy \Provider \IdentifyMethods \IdentifyMethodsPolicy ;
2022use OCA \Libresign \Service \Policy \Provider \Signature \SignatureFlowPolicy ;
2123use OCA \Libresign \Service \Policy \Runtime \PolicyRegistry ;
2224use OCA \Libresign \Service \Policy \Runtime \PolicySource ;
@@ -59,9 +61,13 @@ public function setUp(): void {
5961 $ this ->l10n = $ this ->createMock (IL10N ::class);
6062 $ this ->l10n ->method ('t ' )->willReturnArgument (0 );
6163 $ container = $ this ->createMock (ContainerInterface::class);
64+ $ identifyMethodService = $ this ->createMock (IdentifyMethodService::class);
6265 $ container
6366 ->method ('get ' )
64- ->willReturnCallback (static function (string $ class ): object {
67+ ->willReturnCallback (static function (string $ class ) use ($ identifyMethodService ): object {
68+ if ($ class === IdentifyMethodsPolicy::class) {
69+ return new IdentifyMethodsPolicy ($ identifyMethodService );
70+ }
6571 if (!\class_exists ($ class )) {
6672 throw new \RuntimeException ('Unexpected provider class: ' . $ class );
6773 }
You can’t perform that action at this time.
0 commit comments