handle error from non-empty folders in nativeshare

This commit is contained in:
Robin Appelman 2014-08-26 19:26:14 +02:00
commit aaf2c049fd
2 changed files with 12 additions and 0 deletions

View file

@ -281,6 +281,15 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
$this->share->del($this->root . '/foobar');
}
/**
* @expectedException \Icewind\SMB\Exception\NotEmptyException
*/
public function testRmdirNotEmpty() {
$this->share->mkdir($this->root . '/foobar');
$this->share->put($this->getTextFile(), $this->root . '/foobar/asd');
$this->share->rmdir($this->root . '/foobar');
}
/**
* @expectedException \Icewind\SMB\Exception\NotFoundException
*/