return non escaped path from exceptions

This commit is contained in:
Robin Appelman 2016-08-27 00:25:35 +02:00
commit 82f961896f
3 changed files with 20 additions and 3 deletions

View file

@ -8,6 +8,7 @@
namespace Icewind\SMB\Test;
use Icewind\SMB\Exception\InvalidPathException;
use Icewind\SMB\Exception\NotFoundException;
use Icewind\SMB\FileInfo;
abstract class AbstractShare extends TestCase {
@ -257,6 +258,15 @@ abstract class AbstractShare extends TestCase {
$this->assertCount(0, $this->share->dir($this->root));
}
public function testNotFoundExceptionPath() {
try {
$this->share->mkdir($this->root . '/foo/bar');
$this->fail();
} catch(NotFoundException $e) {
$this->assertEquals($this->root . '/foo/bar', $e->getPath());
}
}
/**
* @expectedException \Icewind\SMB\Exception\NotFoundException
*/