Skip to content

Commit 7f348c0

Browse files
committed
fix(tests): Update EncryptionWrapperTest for isEnabled() check
Updates EncryptionWrapperTest to mock isEnabled() return value, which is now required after adding encryption enabled check to wrapStorage() method. Changes: - Mock Manager::isEnabled() to return expected wrapping state - Tests expecting wrapper (true) → isEnabled() returns true - Tests expecting no wrapper (false) → isEnabled() returns false This ensures the test validates the correct behavior: - Wrapper applied only when encryption is enabled - Wrapper skipped when encryption is disabled Fixes test failures caused by refactored EncryptionWrapper logic. Signed-off-by: Stephen Cuppett <[email protected]>
1 parent 634d025 commit 7f348c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/lib/Encryption/EncryptionWrapperTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public function testWrapStorage($expectedWrapped, $wrappedStorages): void {
6161
->disableOriginalConstructor()
6262
->getMock();
6363

64+
// Mock encryption being enabled for tests that expect wrapping
65+
$this->manager->expects($this->any())
66+
->method('isEnabled')
67+
->willReturn($expectedWrapped);
68+
6469
$returnedStorage = $this->instance->wrapStorage('mountPoint', $storage, $mount);
6570

6671
$this->assertEquals(

0 commit comments

Comments
 (0)