Skip to content

Commit c6cc732

Browse files
committed
fix(ci): add missing newline, fix IdentifyMethodsPolicy ctor in test, update friendly_name expectation
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 3a619ba commit c6cc732

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/Exception/FooterStampUnavailableException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
use RuntimeException;
1212

1313
class FooterStampUnavailableException extends RuntimeException {
14-
}
14+
}

tests/php/Unit/Handler/CertificateEngine/AEngineHandlerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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(

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
use OCA\Libresign\Db\PermissionSetBindingMapper;
1616
use OCA\Libresign\Db\PermissionSetMapper;
1717
use OCA\Libresign\Service\Policy\Model\PolicyContext;
18+
use OCA\Libresign\Service\IdentifyMethodService;
1819
use OCA\Libresign\Service\Policy\Provider\ApprovalGroups\ApprovalGroupsPolicy;
1920
use OCA\Libresign\Service\Policy\Provider\DocMdp\DocMdpPolicy;
21+
use OCA\Libresign\Service\Policy\Provider\IdentifyMethods\IdentifyMethodsPolicy;
2022
use OCA\Libresign\Service\Policy\Provider\Signature\SignatureFlowPolicy;
2123
use OCA\Libresign\Service\Policy\Runtime\PolicyRegistry;
2224
use 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
}

0 commit comments

Comments
 (0)