diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 11:11:52 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-27 11:03:51 +0200 |
commit | d600955a51a9536ac9ebfa7198ef963679153740 (patch) | |
tree | 3ff846f2b2e049de80c36bd2721bfa58eebb64a5 /tests | |
parent | 4e97228cde0016439b4cad9b118fae7380fb0874 (diff) | |
download | nextcloud-server-d600955a51a9536ac9ebfa7198ef963679153740.tar.gz nextcloud-server-d600955a51a9536ac9ebfa7198ef963679153740.zip |
Make getDefaultModuleId public and get module protected
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/encryption/managertest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/encryption/managertest.php b/tests/lib/encryption/managertest.php index a8c51362bda..faca6474504 100644 --- a/tests/lib/encryption/managertest.php +++ b/tests/lib/encryption/managertest.php @@ -123,8 +123,10 @@ class ManagerTest extends TestCase { $en0 = $this->manager->getEncryptionModule('ID0'); $this->assertEquals('ID0', $en0->getId()); - $en0 = $this->manager->getDefaultEncryptionModule(); + $en0 = \Test_Helper::invokePrivate($this->manager, 'getDefaultEncryptionModule'); $this->assertEquals('ID0', $en0->getId()); + + $this->assertEquals('ID0', $this->manager->getDefaultEncryptionModuleId()); } public function testSetDefaultEncryptionModule() { @@ -143,7 +145,7 @@ class ManagerTest extends TestCase { // Default module is the first we set $defaultId = 'ID0'; - $this->assertEquals('ID0', \Test_Helper::invokePrivate($this->manager, 'getDefaultEncryptionModuleId')); + $this->assertEquals('ID0', $this->manager->getDefaultEncryptionModuleId()); // Set to an existing module $this->config->expects($this->once()) @@ -151,11 +153,11 @@ class ManagerTest extends TestCase { ->with('core', 'default_encryption_module', 'ID1'); $this->assertTrue($this->manager->setDefaultEncryptionModule('ID1')); $defaultId = 'ID1'; - $this->assertEquals('ID1', \Test_Helper::invokePrivate($this->manager, 'getDefaultEncryptionModuleId')); + $this->assertEquals('ID1', $this->manager->getDefaultEncryptionModuleId()); // Set to an unexisting module $this->assertFalse($this->manager->setDefaultEncryptionModule('ID2')); - $this->assertEquals('ID1', \Test_Helper::invokePrivate($this->manager, 'getDefaultEncryptionModuleId')); + $this->assertEquals('ID1', $this->manager->getDefaultEncryptionModuleId()); } // /** |