diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php
index c317c024eaef854d53d61136592e96130e45480d..cc8709b6f246868967155de6db58f5f8d9d24d93 100755
--- a/apps/files_encryption/tests/trashbin.php
+++ b/apps/files_encryption/tests/trashbin.php
@@ -238,6 +238,7 @@ class Test_Encryption_Trashbin extends \PHPUnit_Framework_TestCase
 			if(strncmp($file['name'], $filename, strlen($filename)) == 0) {
 				$path_parts = pathinfo($file['name']);
 				$trashFileSuffix = $path_parts['extension'];
+				break;
 			}
 		}