apps/encryption/tests/lib/UtilTest.php 1 location
|
@@ 139-145 (lines=7) @@
|
| 136 |
|
* @param string $value |
| 137 |
|
* @param bool $expect |
| 138 |
|
*/ |
| 139 |
|
public function testIsMasterKeyEnabled($value, $expect) { |
| 140 |
|
$this->configMock->expects($this->once())->method('getAppValue') |
| 141 |
|
->with('encryption', 'useMasterKey', '0')->willReturn($value); |
| 142 |
|
$this->assertSame($expect, |
| 143 |
|
$this->instance->isMasterKeyEnabled() |
| 144 |
|
); |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
public function dataTestIsMasterKeyEnabled() { |
| 148 |
|
return [ |
apps/encryption/tests/lib/KeyManagerTest.php 1 location
|
@@ 508-515 (lines=8) @@
|
| 505 |
|
); |
| 506 |
|
} |
| 507 |
|
|
| 508 |
|
public function testGetMasterKeyPassword() { |
| 509 |
|
$this->configMock->expects($this->once())->method('getSystemValue')->with('secret') |
| 510 |
|
->willReturn('password'); |
| 511 |
|
|
| 512 |
|
$this->assertSame('password', |
| 513 |
|
$this->invokePrivate($this->instance, 'getMasterKeyPassword', []) |
| 514 |
|
); |
| 515 |
|
} |
| 516 |
|
|
| 517 |
|
/** |
| 518 |
|
* @expectedException \Exception |