mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Add exceptions for more connection failures
This commit is contained in:
parent
40fa68e426
commit
c8a93a9033
6 changed files with 82 additions and 0 deletions
|
|
@ -505,4 +505,30 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals($size, $info->getSize());
|
||||
$this->assertFalse($info->isHidden());
|
||||
}
|
||||
|
||||
public function testDelAfterStat() {
|
||||
$name = 'foo.txt';
|
||||
$txtFile = $this->getTextFile();
|
||||
|
||||
$this->share->put($txtFile, $this->root . '/' . $name);
|
||||
unlink($txtFile);
|
||||
|
||||
$this->share->stat($this->root . '/' . $name);
|
||||
$this->share->del($this->root . '/foo.txt');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @dataProvider nameProvider
|
||||
*/
|
||||
public function testDirPaths($name) {
|
||||
$txtFile = $this->getTextFile();
|
||||
$this->share->mkdir($this->root . '/' . $name);
|
||||
$this->share->put($txtFile, $this->root . '/' . $name . '/' . $name);
|
||||
unlink($txtFile);
|
||||
|
||||
$content = $this->share->dir($this->root . '/' . $name);
|
||||
$this->assertCount(1, $content);
|
||||
$this->assertEquals($name, $content[0]->getName());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue