Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-01 03:43:56 +0400
committerFlorin Peter <github@florin-peter.de>2013-05-01 03:43:56 +0400
commit04b0843bb4484695ec6c4fb060a4ae4b3e8a996f (patch)
tree47bd007cc5d472db656a9b1888254790970c5b5a /apps/files_encryption/tests/crypt.php
parent3c100af1329c1c101f38f23f2d74710954387fdf (diff)
fixed some tests
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-xapps/files_encryption/tests/crypt.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 7f9572f4266..4a85048ba43 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -21,7 +21,6 @@ use OCA\Encryption;
// This has to go here because otherwise session errors arise, and the private
// encryption key needs to be saved in the session
-\OC_User::login( 'admin', 'admin' );
/**
* @note It would be better to use Mockery here for mocking out the session
@@ -37,7 +36,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
// reset backend
\OC_User::useBackend('database');
- // set content for encrypting / decrypting in tests
+ // set content for encrypting / decrypting in tests
$this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) );
$this->dataShort = 'hats';
$this->dataUrl = realpath( dirname(__FILE__).'/../lib/crypt.php' );
@@ -60,13 +59,17 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::init($this->userId, '/');
\OC\Files\Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => $this->dataDir), '/' );
+
+ $params['uid'] = $this->userId;
+ $params['password'] = $this->pass;
+ OCA\Encryption\Hooks::login($params);
}
function tearDown() {
}
- function testGenerateKey() {
+ function testGenerateKey() {
# TODO: use more accurate (larger) string length for test confirmation