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-18 00:45:09 +0400
committerFlorin Peter <github@florin-peter.de>2013-05-18 00:45:09 +0400
commit41165afa598e828f86c07440350a5b2453dd5ddc (patch)
treed6b1ac292aa17f38c0a059811e757fd7f0a9d38c /apps/files_encryption/tests/crypt.php
parent3aa48616a6cc960896d8a17e7854a71ee6f308a7 (diff)
improved tests
Diffstat (limited to 'apps/files_encryption/tests/crypt.php')
-rwxr-xr-xapps/files_encryption/tests/crypt.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 16cdc88f1c0..2dd644e07b4 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -340,7 +340,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
//print_r($r);
// Join IVs and their respective data chunks
- $e = array( $r[0].$r[1], $r[2].$r[3], $r[4].$r[5], $r[6].$r[7], $r[8].$r[9], $r[10].$r[11], $r[12].$r[13] );//.$r[11], $r[12].$r[13], $r[14] );
+ $e = array( $r[0].$r[1], $r[2].$r[3], $r[4].$r[5], $r[6].$r[7], $r[8].$r[9], $r[10].$r[11]);//.$r[11], $r[12].$r[13], $r[14] );
//print_r($e);
@@ -395,6 +395,14 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
// Test that data was successfully written
$this->assertTrue( is_int( $cryptedFile ) );
+ // Disable encryption proxy to prevent recursive calls
+ $proxyStatus = \OC_FileProxy::$enabled;
+ \OC_FileProxy::$enabled = false;
+
+ $this->assertTrue(Encryption\Crypt::isEncryptedMeta($filename));
+
+ \OC_FileProxy::$enabled = $proxyStatus;
+
// Get file decrypted contents
$decrypt = file_get_contents( 'crypt://' . $filename );
@@ -616,7 +624,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
// Test that data was successfully written
$this->assertTrue( is_int( $cryptedFile ) );
- // Get file decrypted contents
+ // Get file decrypted contents
$decrypt = file_get_contents( 'crypt://' . $filename );
$this->assertEquals( $this->dataLong, $decrypt );