aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/Cache/PropagatorTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php
index 402b29c8c3e..bcd808a8402 100644
--- a/tests/lib/Files/Cache/PropagatorTest.php
+++ b/tests/lib/Files/Cache/PropagatorTest.php
@@ -81,6 +81,17 @@ class PropagatorTest extends TestCase {
}
}
+ public function testSizePropagationNoNegative() {
+ $paths = ['', 'foo', 'foo/bar'];
+ $oldInfos = $this->getFileInfos($paths);
+ $this->storage->getPropagator()->propagateChange('foo/bar/file.txt', time(), -100);
+ $newInfos = $this->getFileInfos($paths);
+
+ foreach ($oldInfos as $i => $oldInfo) {
+ $this->assertEquals(-1, $newInfos[$i]->getSize());
+ }
+ }
+
public function testBatchedPropagation() {
$this->storage->mkdir('foo/baz');
$this->storage->mkdir('asd');