diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-26 11:46:32 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:27 +0200 |
commit | 7ffd77fac9f0baadbbaac6e0dd7e62de78197b52 (patch) | |
tree | 46881f58af4b5a68c51468f80eae97a77845b925 | |
parent | c00e728e5f77722bceaa0bba25a02128039d7127 (diff) | |
download | nextcloud-server-7ffd77fac9f0baadbbaac6e0dd7e62de78197b52.tar.gz nextcloud-server-7ffd77fac9f0baadbbaac6e0dd7e62de78197b52.zip |
enable encryption unit test execution
-rw-r--r-- | apps/encryption/tests/lib/MigratorTest.php | 61 | ||||
-rw-r--r-- | apps/encryption/tests/lib/RequirementsCheckerTest.php | 51 | ||||
-rw-r--r-- | tests/enable_all.php | 1 |
3 files changed, 1 insertions, 112 deletions
diff --git a/apps/encryption/tests/lib/MigratorTest.php b/apps/encryption/tests/lib/MigratorTest.php deleted file mode 100644 index 0d30b9865b9..00000000000 --- a/apps/encryption/tests/lib/MigratorTest.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * @author Clark Tomlinson <fallen013@gmail.com> - * @since 3/9/15, 2:56 PM - * @link http:/www.clarkt.com - * @copyright Clark Tomlinson © 2015 - * - */ - -namespace OCA\Encryption\Tests; - - -use OCA\Encryption\Migrator; -use Test\TestCase; - -class MigratorTest extends TestCase { - - /** - * @var Migrator - */ - private $instance; - - /** - * - */ - public function testGetStatus() { - $this->assertFalse($this->instance->getStatus('admin')); - } - - /** - * - */ - public function testBeginMigration() { - $this->assertTrue($this->instance->beginMigration()); - } - - /** - * - */ - public function testSetMigrationStatus() { - $this->assertTrue(\Test_Helper::invokePrivate($this->instance, - 'setMigrationStatus', - ['0', '-1']) - ); - } - - /** - * - */ - protected function setUp() { - parent::setUp(); - - $cryptMock = $this->getMockBuilder('OCA\Encryption\Crypto\Crypt')->disableOriginalConstructor()->getMock(); - $this->instance = new Migrator($this->getMock('OCP\IConfig'), - $this->getMock('OCP\IUserManager'), - $this->getMock('OCP\ILogger'), - $cryptMock); - } - - -} diff --git a/apps/encryption/tests/lib/RequirementsCheckerTest.php b/apps/encryption/tests/lib/RequirementsCheckerTest.php deleted file mode 100644 index 97ddd76b750..00000000000 --- a/apps/encryption/tests/lib/RequirementsCheckerTest.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * @author Clark Tomlinson <fallen013@gmail.com> - * @since 3/6/15, 10:36 AM - * @link http:/www.clarkt.com - * @copyright Clark Tomlinson © 2015 - * - */ - -namespace OCA\Encryption\Tests; - - -use OCA\Encryption\RequirementsChecker; -use Test\TestCase; - -class RequirementsCheckerTest extends TestCase { - /** - * @var RequirementsChecker - */ - private $instance; - - /** - * - */ - protected function setUp() { - parent::setUp(); - $log = $this->getMock('OCP\ILogger'); - $crypt = $this->getMockBuilder('OCA\Encryption\Crypt') - ->disableOriginalConstructor() - ->getMock(); - $crypt - ->method('getOpenSSLPkey') - ->will($this->returnValue(true)); - $this->instance = new RequirementsChecker($crypt, $log); - } - - /** - * - */ - public function testCanCheckConfigration() { - $this->assertTrue($this->instance->checkConfiguration()); - } - - /** - * - */ - public function testCanCheckRequiredExtensions() { - $this->assertTrue($this->instance->checkExtensions()); - } - -} diff --git a/tests/enable_all.php b/tests/enable_all.php index e9b538713a5..61c94e6effe 100644 --- a/tests/enable_all.php +++ b/tests/enable_all.php @@ -19,6 +19,7 @@ function enableApp($app) { enableApp('files_sharing'); enableApp('files_trashbin'); enableApp('files_encryption'); +enableApp('encryption'); enableApp('user_ldap'); enableApp('files_versions'); enableApp('provisioning_api'); |