Wait with getting the timezone from the server until we need it

This commit is contained in:
Robin Appelman 2015-03-13 13:12:00 +01:00
commit 476980d4ce
5 changed files with 72 additions and 15 deletions

View file

@ -331,7 +331,7 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
$this->share->put($this->getTextFile(), $this->root . '/foo.txt');
$dir = $this->share->dir($this->root);
$mtime = $dir[0]->getMTime();
$this->assertTrue(abs($now - $mtime) <= 1, 'Modified time differs by ' . abs($now - $mtime) . ' seconds');
$this->assertTrue(abs($now - $mtime) <= 2, 'Modified time differs by ' . abs($now - $mtime) . ' seconds');
$this->share->del($this->root . '/foo.txt');
}
@ -531,4 +531,9 @@ abstract class AbstractShare extends \PHPUnit_Framework_TestCase {
$this->assertCount(1, $content);
$this->assertEquals($name, $content[0]->getName());
}
public function testStatRoot() {
$info = $this->share->stat('/');
$this->assertInstanceOf('\Icewind\SMB\IFileInfo', $info);
}
}