mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
adjust modified dates to the correct timezone
This commit is contained in:
parent
cb96c44176
commit
f8bc64f097
4 changed files with 33 additions and 2 deletions
|
|
@ -48,4 +48,9 @@ class Server extends \PHPUnit_Framework_TestCase {
|
|||
$server = new \SMB\Server(uniqid(), $this->config->user, $this->config->password);
|
||||
$server->listShares();
|
||||
}
|
||||
|
||||
public function testGetTimeZone() {
|
||||
$timeZone = $this->server->getTimeZone();
|
||||
$this->assertEquals('+0200', $timeZone);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,7 +266,16 @@ class Share extends \PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* @expectedException \SMB\NotFoundException
|
||||
*/
|
||||
public function testRmDirNonExisting(){
|
||||
public function testRmDirNonExisting() {
|
||||
$this->share->rmdir('/foobar/asd');
|
||||
}
|
||||
|
||||
public function testModifiedDate() {
|
||||
$now = time();
|
||||
$this->share->put($this->getTextFile(), $this->root . '/foo.txt');
|
||||
$dir = $this->share->dir($this->root);
|
||||
$mtime = $dir['foo.txt']['time'];
|
||||
$this->assertTrue(abs($now - $mtime) <= 1, 'Modified time differs by ' . abs($now - $mtime) . ' seconds');
|
||||
$this->share->del($this->root . '/foo.txt');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue