diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 9a780d4587c35ec2edff21a00921309045449986..a07bd19c1dd21b3db49bfa2475702ca18ce38ff0 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -141,9 +141,6 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
 	 */
 	function testSetFileKey() {
 
-		# NOTE: This cannot be tested until we are able to break out 
-		# of the FileSystemView data directory root
-
 		$key = Encryption\Crypt::symmetricEncryptFileContentKeyfile($this->randomKey, 'hat');
 
 		$file = 'unittest-' . time() . '.txt';
@@ -159,6 +156,9 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
 
 		//$view = new \OC_FilesystemView( '/' . $this->userId . '/files_encryption/keyfiles' );
 		Encryption\Keymanager::setFileKey($this->view, $file, $this->userId, $key['key']);
+		
+		$this->assertTrue($this->view->file_exists(
+			'/' . $this->userId . '/files_encryption/keyfiles/' . $file . '.key'));
 
 		// enable encryption proxy
 		$proxyStatus = \OC_FileProxy::$enabled;
@@ -233,7 +233,7 @@ class Test_Encryption_Keymanager extends \PHPUnit_Framework_TestCase {
 		\OC_FileProxy::$enabled = true;
 
 		// save file with content
-		$cryptedFile = file_put_contents('crypt://'.'/'.Test_Encryption_Keymanager::TEST_USER.'files//folder1/subfolder/subsubfolder/' . $filename, $this->dataShort);
+		$cryptedFile = file_put_contents('crypt:///'.Test_Encryption_Keymanager::TEST_USER.'/files/folder1/subfolder/subsubfolder' . $filename, $this->dataShort);
 
 		// test that data was successfully written
 		$this->assertTrue(is_int($cryptedFile));
diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php
index 67854bd80d52c4e22daed128a93d0fcd8bdd0840..985271b90219d19017990ab4e1bd0b0406e3cbe9 100755
--- a/apps/files_encryption/tests/trashbin.php
+++ b/apps/files_encryption/tests/trashbin.php
@@ -122,7 +122,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase {
 		$filename = 'tmp-' . time() . '.txt';
 
 		// save file with content
-		$cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/'. $filename, $this->dataShort);
+		$cryptedFile = file_put_contents('crypt:///' .\Test_Encryption_Trashbin::TEST_ENCRYPTION_TRASHBIN_USER1. '/files/'. $filename, $this->dataShort);
 
 		// test that data was successfully written
 		$this->assertTrue(is_int($cryptedFile));
@@ -223,7 +223,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase {
 	function testPermanentDeleteFile() {
 
 		// generate filename
-		$filename = '/tmp-' . time() . '.txt';
+		$filename = 'tmp-' . time() . '.txt';
 
 		// save file with content
 		$cryptedFile = file_put_contents('crypt:///' .$this->userId. '/files/' . $filename, $this->dataShort);