aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Cache/PropagatorTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Cache/PropagatorTest.php')
-rw-r--r--tests/lib/Files/Cache/PropagatorTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php
index c1822c90282..2ab213e9567 100644
--- a/tests/lib/Files/Cache/PropagatorTest.php
+++ b/tests/lib/Files/Cache/PropagatorTest.php
@@ -1,9 +1,9 @@
<?php
+
/**
- * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Files\Cache;
@@ -17,7 +17,7 @@ use Test\TestCase;
* @group DB
*/
class PropagatorTest extends TestCase {
- /** @var IStorage */
+ /** @var IStorage */
private $storage;
protected function setUp(): void {
@@ -39,7 +39,7 @@ class PropagatorTest extends TestCase {
return array_combine($paths, $values);
}
- public function testEtagPropagation() {
+ public function testEtagPropagation(): void {
$paths = ['', 'foo', 'foo/bar'];
$oldInfos = $this->getFileInfos($paths);
$this->storage->getPropagator()->propagateChange('foo/bar/file.txt', time());
@@ -50,7 +50,7 @@ class PropagatorTest extends TestCase {
}
}
- public function testTimePropagation() {
+ public function testTimePropagation(): void {
$paths = ['', 'foo', 'foo/bar'];
$oldTime = time() - 200;
$targetTime = time() - 100;
@@ -70,7 +70,7 @@ class PropagatorTest extends TestCase {
$this->assertEquals($now, $newInfos['']->getMTime());
}
- public function testSizePropagation() {
+ public function testSizePropagation(): void {
$paths = ['', 'foo', 'foo/bar'];
$oldInfos = $this->getFileInfos($paths);
$this->storage->getPropagator()->propagateChange('foo/bar/file.txt', time(), 10);
@@ -81,7 +81,7 @@ class PropagatorTest extends TestCase {
}
}
- public function testSizePropagationNoNegative() {
+ public function testSizePropagationNoNegative(): void {
$paths = ['', 'foo', 'foo/bar'];
$oldInfos = $this->getFileInfos($paths);
$this->storage->getPropagator()->propagateChange('foo/bar/file.txt', time(), -100);
@@ -92,7 +92,7 @@ class PropagatorTest extends TestCase {
}
}
- public function testBatchedPropagation() {
+ public function testBatchedPropagation(): void {
$this->storage->mkdir('foo/baz');
$this->storage->mkdir('asd');
$this->storage->file_put_contents('asd/file.txt', 'bar');
@@ -123,7 +123,7 @@ class PropagatorTest extends TestCase {
foreach ($oldInfos as $i => $oldInfo) {
if ($oldInfo->getPath() !== 'foo/baz') {
- $this->assertNotEquals($oldInfo->getEtag(), $newInfos[$i]->getEtag());
+ $this->assertNotEquals($oldInfo->getEtag(), $newInfos[$i]->getEtag(), "etag for {$oldInfo->getPath()} not updated");
}
}