mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Basic test case for listShares
This commit is contained in:
parent
37fbf43f7d
commit
6c4587eb10
2 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue