mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Also clean up the share if cleaning up fails
This commit is contained in:
parent
d311cd3c21
commit
80d5918640
1 changed files with 12 additions and 5 deletions
|
|
@ -28,10 +28,15 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
|
try {
|
||||||
if ($this->share) {
|
if ($this->share) {
|
||||||
$this->cleanDir($this->root);
|
$this->cleanDir($this->root);
|
||||||
}
|
}
|
||||||
unset($this->share);
|
unset($this->share);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
unset($this->share);
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function nameProvider() {
|
public function nameProvider() {
|
||||||
|
|
@ -474,8 +479,10 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
|
||||||
array('bar.txt'),
|
array('bar.txt'),
|
||||||
array("single'quote'/sub/foo.txt"),
|
array("single'quote'/sub/foo.txt"),
|
||||||
array('日本語/url %2F +encode/asd.txt'),
|
array('日本語/url %2F +encode/asd.txt'),
|
||||||
array('a somewhat longer folder than the other with more charaters as the all the other filenames/' .
|
array(
|
||||||
'followed by a somewhat long file name after that.txt')
|
'a somewhat longer folder than the other with more charaters as the all the other filenames/' .
|
||||||
|
'followed by a somewhat long file name after that.txt'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue