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/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-04-20 22:28:36 +0300
committerGitHub <noreply@github.com>2021-04-20 22:28:36 +0300
commit25406ebba242503eac553c6d3c1c1829c454afd8 (patch)
tree31b8675b3d9d3e42e9a20e8754b75281d7abd0d3 /apps
parent46872e392183215a2bcac2e7e80937ae58e4b4ab (diff)
parentfc6fbb649999c39968c88721f51112d0a0c67131 (diff)
Merge pull request #26652 from nextcloud/bugfix/noid/fix-broken-test
Fix broken Expiration test
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/tests/ExpirationTest.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php
index adef194f34f..d33c502f419 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -24,6 +24,8 @@
*
*/
+namespace OCA\Files_Trashbin\Tests;
+
use OCA\Files_Trashbin\Expiration;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
@@ -118,16 +120,16 @@ class ExpirationTest extends \Test\TestCase {
}
- public function configData() {
+ public function timestampTestData(): array {
return [
- [ 'disabled', null, null, null],
- [ 'auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
- [ 'auto,auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
- [ 'auto, auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
- [ 'auto, 3', Expiration::NO_OBLIGATION, 3, true ],
- [ '5, auto', 5, Expiration::NO_OBLIGATION, true ],
- [ '3, 5', 3, 5, false ],
- [ '10, 3', 10, 10, false ],
+ [ 'disabled', false],
+ [ 'auto', false ],
+ [ 'auto,auto', false ],
+ [ 'auto, auto', false ],
+ [ 'auto, 3', self::FAKE_TIME_NOW - (3 * self::SECONDS_PER_DAY) ],
+ [ '5, auto', false ],
+ [ '3, 5', self::FAKE_TIME_NOW - (5 * self::SECONDS_PER_DAY) ],
+ [ '10, 3', self::FAKE_TIME_NOW - (10 * self::SECONDS_PER_DAY) ],
];
}