Merge pull request #6057 from owncloud/extstorage-touchoperation

Return true when touch succeeds
This commit is contained in:
Morris Jobke 2013-11-26 04:40:25 -08:00
commit 5cb1ce4a28
3 changed files with 8 additions and 1 deletions

View file

@ -68,6 +68,7 @@ abstract class StreamWrapper extends Common {
}
} else {
$this->file_put_contents($path, '');
return true;
}
}

View file

@ -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');

View file

@ -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'));
}