mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
check if we can find smbclient in path
This commit is contained in:
parent
82f961896f
commit
7ddcd96e47
3 changed files with 24 additions and 3 deletions
|
|
@ -33,4 +33,20 @@ class Share extends AbstractShare {
|
|||
$share = $this->server->getShare($this->config->share);
|
||||
$share->dir($this->root);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Icewind\SMB\Exception\DependencyException
|
||||
*/
|
||||
public function testNoSmbclient() {
|
||||
$system = $this->getMockBuilder('\Icewind\SMB\System')
|
||||
->setMethods(['getSmbclientPath'])
|
||||
->getMock();
|
||||
$share = new \Icewind\SMB\Share($this->server, 'dummy', $system);
|
||||
|
||||
$system->expects($this->any())
|
||||
->method('getSmbclientPath')
|
||||
->will($this->returnValue(''));
|
||||
|
||||
$share->mkdir('');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue