Basic test case for listShares

This commit is contained in:
Robin Appelman 2013-03-03 22:23:56 +01:00
commit 6c4587eb10
2 changed files with 14 additions and 0 deletions

View file

@ -37,6 +37,10 @@ class Share {
$this->connection = new Connection($command); $this->connection = new Connection($command);
} }
public function getName() {
return $this->name;
}
/** /**
* List the content of a remote folder * List the content of a remote folder
* *

View file

@ -27,6 +27,16 @@ class Test extends PHPUnit_Framework_TestCase {
$this->share->rmdir($this->root); $this->share->rmdir($this->root);
} }
public function testListShares() {
$shares = $this->server->listShares();
foreach ($shares as $share) {
if ($share->getName() === 'test') {
return;
}
}
$this->fail('Share "test" not found');
}
public function testDirectory() { public function testDirectory() {
$this->assertEquals(array(), $this->share->dir($this->root)); $this->assertEquals(array(), $this->share->dir($this->root));