diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-27 09:46:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-27 09:46:10 -0600 |
commit | f76a3b532d9ee3d5362cbf8fcf9d836264fb6e00 (patch) | |
tree | fcebcca16a77de84ea2cba7fe018c84c540c1ec0 /tests/lib | |
parent | dc5ba954693ba95b687c517b1bad895f706c8309 (diff) | |
parent | 8de4209c3ef01889bc3aa487137129c3911ca235 (diff) | |
download | nextcloud-server-f76a3b532d9ee3d5362cbf8fcf9d836264fb6e00.tar.gz nextcloud-server-f76a3b532d9ee3d5362cbf8fcf9d836264fb6e00.zip |
Merge pull request #4096 from nextcloud/touch-floor
round the mtime in touch
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 3635323e169..f1e1ee7d417 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -591,6 +591,23 @@ class ViewTest extends \Test\TestCase { /** * @medium */ + public function testTouchFloat() { + $storage = $this->getTestStorage(true, TemporaryNoTouch::class); + + Filesystem::mount($storage, array(), '/'); + + $rootView = new View(''); + $oldCachedData = $rootView->getFileInfo('foo.txt'); + + $rootView->touch('foo.txt', 500.5); + + $cachedData = $rootView->getFileInfo('foo.txt'); + $this->assertEquals(500, $cachedData['mtime']); + } + + /** + * @medium + */ public function testViewHooks() { $storage1 = $this->getTestStorage(); $storage2 = $this->getTestStorage(); |