Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-03-27 18:04:55 +0300
committerRobin Appelman <robin@icewind.nl>2017-03-27 18:07:48 +0300
commit8de4209c3ef01889bc3aa487137129c3911ca235 (patch)
treeec34187ff3c7e9b217c9100e586ea83a833de145 /tests/lib
parentf154b1d32ce0d469e5c4f96195e169f1aa4d5406 (diff)
round the mtime in touch
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Files/ViewTest.php17
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();