aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Encryption/ManagerTest.php')
-rw-r--r--tests/lib/Encryption/ManagerTest.php114
1 files changed, 57 insertions, 57 deletions
diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php
index 4e354ad518c..5d8cf02f94d 100644
--- a/tests/lib/Encryption/ManagerTest.php
+++ b/tests/lib/Encryption/ManagerTest.php
@@ -193,63 +193,63 @@ class ManagerTest extends TestCase {
$this->assertEquals('ID1', $this->manager->getDefaultEncryptionModuleId());
}
-// /**
-// * @expectedException \OC\Encryption\Exceptions\ModuleAlreadyExistsException
-// * @expectedExceptionMessage Id "0" already used by encryption module "TestDummyModule0"
-// */
-// public function testModuleRegistration() {
-// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
-// $em = $this->createMock(IEncryptionModule::class);
-// $em->expects($this->any())->method('getId')->willReturn(0);
-// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
-// $m = new Manager($config);
-// $m->registerEncryptionModule($em);
-// $this->assertTrue($m->isEnabled());
-// $m->registerEncryptionModule($em);
-// }
-//
-// public function testModuleUnRegistration() {
-// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
-// $em = $this->createMock(IEncryptionModule::class);
-// $em->expects($this->any())->method('getId')->willReturn(0);
-// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
-// $m = new Manager($config);
-// $m->registerEncryptionModule($em);
-// $this->assertTrue($m->isEnabled());
-// $m->unregisterEncryptionModule($em);
-// $this->assertFalse($m->isEnabled());
-// }
-//
-// /**
-// * @expectedException \OC\Encryption\Exceptions\ModuleDoesNotExistsException
-// * @expectedExceptionMessage Module with ID: unknown does not exist.
-// */
-// public function testGetEncryptionModuleUnknown() {
-// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
-// $em = $this->createMock(IEncryptionModule::class);
-// $em->expects($this->any())->method('getId')->willReturn(0);
-// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
-// $m = new Manager($config);
-// $m->registerEncryptionModule($em);
-// $this->assertTrue($m->isEnabled());
-// $m->getEncryptionModule('unknown');
-// }
-//
-// public function testGetEncryptionModule() {
-// $config = $this->createMock(IConfig::class);
-// $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
-// $em = $this->createMock(IEncryptionModule::class);
-// $em->expects($this->any())->method('getId')->willReturn(0);
-// $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
-// $m = new Manager($config);
-// $m->registerEncryptionModule($em);
-// $this->assertTrue($m->isEnabled());
-// $en0 = $m->getEncryptionModule(0);
-// $this->assertEquals(0, $en0->getId());
-// }
+ // /**
+ // * @expectedException \OC\Encryption\Exceptions\ModuleAlreadyExistsException
+ // * @expectedExceptionMessage Id "0" already used by encryption module "TestDummyModule0"
+ // */
+ // public function testModuleRegistration() {
+ // $config = $this->createMock(IConfig::class);
+ // $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
+ // $em = $this->createMock(IEncryptionModule::class);
+ // $em->expects($this->any())->method('getId')->willReturn(0);
+ // $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+ // $m = new Manager($config);
+ // $m->registerEncryptionModule($em);
+ // $this->assertTrue($m->isEnabled());
+ // $m->registerEncryptionModule($em);
+ // }
+ //
+ // public function testModuleUnRegistration() {
+ // $config = $this->createMock(IConfig::class);
+ // $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
+ // $em = $this->createMock(IEncryptionModule::class);
+ // $em->expects($this->any())->method('getId')->willReturn(0);
+ // $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+ // $m = new Manager($config);
+ // $m->registerEncryptionModule($em);
+ // $this->assertTrue($m->isEnabled());
+ // $m->unregisterEncryptionModule($em);
+ // $this->assertFalse($m->isEnabled());
+ // }
+ //
+ // /**
+ // * @expectedException \OC\Encryption\Exceptions\ModuleDoesNotExistsException
+ // * @expectedExceptionMessage Module with ID: unknown does not exist.
+ // */
+ // public function testGetEncryptionModuleUnknown() {
+ // $config = $this->createMock(IConfig::class);
+ // $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
+ // $em = $this->createMock(IEncryptionModule::class);
+ // $em->expects($this->any())->method('getId')->willReturn(0);
+ // $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+ // $m = new Manager($config);
+ // $m->registerEncryptionModule($em);
+ // $this->assertTrue($m->isEnabled());
+ // $m->getEncryptionModule('unknown');
+ // }
+ //
+ // public function testGetEncryptionModule() {
+ // $config = $this->createMock(IConfig::class);
+ // $config->expects($this->any())->method('getSystemValueBool')->willReturn(true);
+ // $em = $this->createMock(IEncryptionModule::class);
+ // $em->expects($this->any())->method('getId')->willReturn(0);
+ // $em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
+ // $m = new Manager($config);
+ // $m->registerEncryptionModule($em);
+ // $this->assertTrue($m->isEnabled());
+ // $en0 = $m->getEncryptionModule(0);
+ // $this->assertEquals(0, $en0->getId());
+ // }
protected function addNewEncryptionModule(Manager $manager, $id) {
$encryptionModule = $this->createMock(IEncryptionModule::class);