1
0
miroir de https://github.com/nextcloud/server.git synchronisé 2024-08-10 02:11:09 +02:00

Updated unit tests for SMB

- coverage for touch return value
- fixed directory provider to exclude unsupported cases
Cette révision appartient à :
Vincent Petry 2013-11-26 12:53:03 +01:00
Parent e102eec89a
révision 712b47757a
2 fichiers modifiés avec 7 ajouts et 1 suppressions

Voir le fichier

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

Voir le fichier

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