Add negative tests for stat and rename

This commit is contained in:
Robin Appelman 2014-08-03 15:36:26 +02:00
commit 9068418528
3 changed files with 28 additions and 2 deletions

View file

@ -39,11 +39,13 @@ class NativeFileInfo implements IFileInfo {
* @param \Icewind\SMB\NativeShare $share
* @param string $path
* @param string $name
* @param array $stat
*/
public function __construct($share, $path, $name) {
public function __construct($share, $path, $name, $stat = null) {
$this->share = $share;
$this->path = $path;
$this->name = $name;
$this->statCache = $stat;
}
/**

View file

@ -101,7 +101,7 @@ class NativeShare implements IShare {
* @return \Icewind\SMB\IFileInfo[]
*/
public function stat($path) {
return new NativeFileInfo($this, $path, basename($path));
return new NativeFileInfo($this, $path, basename($path), $this->getStat($path));
}
public function getStat($path) {