summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-27 10:07:59 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:27 +0200
commit8dde93254680bfb481e8c737fd3696ee5a9e74da (patch)
tree0457e20154d14da7d4d7cdad59bcccb68e268326 /tests
parentd15c2e52b0576e7846a09fd84e0e10f3054623c6 (diff)
downloadnextcloud-server-8dde93254680bfb481e8c737fd3696ee5a9e74da.tar.gz
nextcloud-server-8dde93254680bfb481e8c737fd3696ee5a9e74da.zip
Comment duplicate test methods
Diffstat (limited to 'tests')
-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 e5a1898515a..4fcbc3b9983 100644
--- a/tests/lib/encryption/managertest.php
+++ b/tests/lib/encryption/managertest.php
@@ -112,61 +112,61 @@ class ManagerTest extends TestCase {
$this->assertEquals(0, $en0->getId());
}
- /**
- * @expectedException \OC\Encryption\Exceptions\ModuleAlreadyExistsException
- * @expectedExceptionMessage Id "0" already used by encryption module "TestDummyModule0"
- */
- public function testModuleRegistration() {
- $config = $this->getMock('\OCP\IConfig');
- $config->expects($this->any())->method('getSystemValue')->willReturn(true);
- $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
- $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->getMock('\OCP\IConfig');
- $config->expects($this->any())->method('getSystemValue')->willReturn(true);
- $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
- $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 exists.
- */
- public function testGetEncryptionModuleUnknown() {
- $config = $this->getMock('\OCP\IConfig');
- $config->expects($this->any())->method('getSystemValue')->willReturn(true);
- $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
- $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->getMock('\OCP\IConfig');
- $config->expects($this->any())->method('getSystemValue')->willReturn(true);
- $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
- $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->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $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->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $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 exists.
+// */
+// public function testGetEncryptionModuleUnknown() {
+// $config = $this->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $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->getMock('\OCP\IConfig');
+// $config->expects($this->any())->method('getSystemValue')->willReturn(true);
+// $em = $this->getMock('\OCP\Encryption\IEncryptionModule');
+// $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());
+// }
}