mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
handle invalid handles in Share->get
This commit is contained in:
parent
d8105d7695
commit
1fb6581c8d
4 changed files with 45 additions and 1 deletions
|
|
@ -230,6 +230,20 @@ abstract class AbstractShare extends TestCase {
|
|||
unlink($targetFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Icewind\SMB\Exception\InvalidResourceException
|
||||
*/
|
||||
public function testGetInvalidTarget() {
|
||||
$name = 'test.txt';
|
||||
$text = 'dummy';
|
||||
$tmpFile = $this->getTextFile($text);
|
||||
|
||||
$this->share->put($tmpFile, $this->root . '/' . $name);
|
||||
unlink($tmpFile);
|
||||
|
||||
$this->share->get($this->root . '/' . $name, '/non/existing/file');
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider nameProvider
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue