Skip to content
Snippets Groups Projects
Commit 5cb1ce4a authored by Morris Jobke's avatar Morris Jobke
Browse files

Merge pull request #6057 from owncloud/extstorage-touchoperation

Return true when touch succeeds
parents dc67c7ef 712b4775
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,7 @@ abstract class StreamWrapper extends Common { ...@@ -68,6 +68,7 @@ abstract class StreamWrapper extends Common {
} }
} else { } else {
$this->file_put_contents($path, ''); $this->file_put_contents($path, '');
return true;
} }
} }
......
...@@ -29,6 +29,11 @@ class SMB extends Storage { ...@@ -29,6 +29,11 @@ class SMB extends Storage {
} }
} }
public function directoryProvider() {
// doesn't support leading/trailing spaces
return array(array('folder'));
}
public function testRenameWithSpaces() { public function testRenameWithSpaces() {
$this->instance->mkdir('with spaces'); $this->instance->mkdir('with spaces');
$result = $this->instance->rename('with spaces', 'foo bar'); $result = $this->instance->rename('with spaces', 'foo bar');
......
...@@ -236,7 +236,8 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { ...@@ -236,7 +236,8 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
public function testTouchCreateFile() { public function testTouchCreateFile() {
$this->assertFalse($this->instance->file_exists('foo')); $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')); $this->assertTrue($this->instance->file_exists('foo'));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment