Merge pull request #26667 from nextcloud/backport/26652/stable21
[stable21] Fix broken Expiration test
This commit is contained in:
commit
144976bcb0
|
@ -24,6 +24,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace OCA\Files_Trashbin\Tests;
|
||||||
|
|
||||||
use OCA\Files_Trashbin\Expiration;
|
use OCA\Files_Trashbin\Expiration;
|
||||||
use OCP\AppFramework\Utility\ITimeFactory;
|
use OCP\AppFramework\Utility\ITimeFactory;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
|
@ -118,16 +120,16 @@ class ExpirationTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function configData() {
|
public function timestampTestData(): array {
|
||||||
return [
|
return [
|
||||||
[ 'disabled', null, null, null],
|
[ 'disabled', false],
|
||||||
[ 'auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
|
[ 'auto', false ],
|
||||||
[ 'auto,auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
|
[ 'auto,auto', false ],
|
||||||
[ 'auto, auto', Expiration::DEFAULT_RETENTION_OBLIGATION, Expiration::NO_OBLIGATION, true ],
|
[ 'auto, auto', false ],
|
||||||
[ 'auto, 3', Expiration::NO_OBLIGATION, 3, true ],
|
[ 'auto, 3', self::FAKE_TIME_NOW - (3 * self::SECONDS_PER_DAY) ],
|
||||||
[ '5, auto', 5, Expiration::NO_OBLIGATION, true ],
|
[ '5, auto', false ],
|
||||||
[ '3, 5', 3, 5, false ],
|
[ '3, 5', self::FAKE_TIME_NOW - (5 * self::SECONDS_PER_DAY) ],
|
||||||
[ '10, 3', 10, 10, false ],
|
[ '10, 3', self::FAKE_TIME_NOW - (10 * self::SECONDS_PER_DAY) ],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue