diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php index 23c5f91a2f33b8ab25f710f95b9b7d88f4ea4412..aa42cbde828083f24f2057f56ef29a8bf0069b01 100644 --- a/apps/files_external/lib/streamwrapper.php +++ b/apps/files_external/lib/streamwrapper.php @@ -68,6 +68,7 @@ abstract class StreamWrapper extends Common { } } else { $this->file_put_contents($path, ''); + return true; } } diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php index 0291f293fa6208e1524bfc5a6aed8e69c92ab5e6..199e35af6763a11b6fb51c5acad0b278849b3d05 100644 --- a/apps/files_external/tests/smb.php +++ b/apps/files_external/tests/smb.php @@ -29,6 +29,11 @@ class SMB extends Storage { } } + public function directoryProvider() { + // doesn't support leading/trailing spaces + return array(array('folder')); + } + public function testRenameWithSpaces() { $this->instance->mkdir('with spaces'); $result = $this->instance->rename('with spaces', 'foo bar'); diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index 6c433e95475c7c8ecdd21af266569bccfd409560..5b5b85568594f7a0c86a2b616334e686c0eb2fdd 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -236,7 +236,8 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { public function testTouchCreateFile() { $this->assertFalse($this->instance->file_exists('foo')); - $this->instance->touch('foo'); + // returns true on success + $this->assertTrue($this->instance->touch('foo')); $this->assertTrue($this->instance->file_exists('foo')); }