Browse Source

Updated unit tests for SMB

- coverage for touch return value
- fixed directory provider to exclude unsupported cases
tags/v6.0.0RC1
Vincent Petry 10 years ago
parent
commit
712b47757a
2 changed files with 7 additions and 1 deletions
  1. 5
    0
      apps/files_external/tests/smb.php
  2. 2
    1
      tests/lib/files/storage/storage.php

+ 5
- 0
apps/files_external/tests/smb.php 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');

+ 2
- 1
tests/lib/files/storage/storage.php 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'));
}


Loading…
Cancel
Save