diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-12-19 15:35:31 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-12-19 15:35:31 +0100 |
commit | 3eb3e437c8a0520192ec7c1018d4d1c55e780dc0 (patch) | |
tree | f436ecbdddcd9924277f0ecca24a140be289bc78 /lib/private/IntegrityCheck/Helpers | |
parent | e536313451d071aa9693411b3964ef26ce75c904 (diff) | |
download | nextcloud-server-3eb3e437c8a0520192ec7c1018d4d1c55e780dc0.tar.gz nextcloud-server-3eb3e437c8a0520192ec7c1018d4d1c55e780dc0.zip |
Add proper tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/IntegrityCheck/Helpers')
-rw-r--r-- | lib/private/IntegrityCheck/Helpers/FileAccessHelper.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php index c3193457890..a7e378c165e 100644 --- a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php +++ b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php @@ -58,7 +58,7 @@ class FileAccessHelper { * @throws \Exception */ public function file_put_contents($filename, $data) { - $bytesWritten = file_put_contents($filename, $data); + $bytesWritten = @file_put_contents($filename, $data); if ($bytesWritten === false || $bytesWritten !== strlen($data)){ throw new \Exception('Failed to write into ' . $filename); } @@ -69,15 +69,15 @@ class FileAccessHelper { * @param string $path * @return bool */ - public function is_writeable($path){ - return is_writeable($path); + public function is_writable($path) { + return is_writable($path); } /** * @param string $path * @throws \Exception */ - public function assertDirectoryExists($path){ + public function assertDirectoryExists($path) { if (!is_dir($path)) { throw new \Exception('Directory ' . $path . ' does not exist.'); } |