diff options
Diffstat (limited to 'apps/files_trashbin/tests/ExpirationTest.php')
-rw-r--r-- | apps/files_trashbin/tests/ExpirationTest.php | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php index 9c9ef72e46f..0c26a86295e 100644 --- a/apps/files_trashbin/tests/ExpirationTest.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -112,7 +112,7 @@ class ExpirationTest extends \Test\TestCase { $expiration = new Expiration($mockedConfig, $mockedTimeFactory); $actualResult = $expiration->isExpired($timestamp, $quotaExceeded); - + $this->assertEquals($expectedResult, $actualResult); } @@ -132,41 +132,6 @@ class ExpirationTest extends \Test\TestCase { /** - * @dataProvider configData - * - * @param string $configValue - * @param int $expectedMinAge - * @param int $expectedMaxAge - * @param bool $expectedCanPurgeToSaveSpace - */ - public function testParseRetentionObligation($configValue, $expectedMinAge, $expectedMaxAge, $expectedCanPurgeToSaveSpace) { - $mockedConfig = $this->getMockedConfig($configValue); - $mockedTimeFactory = $this->getMockedTimeFactory( - time() - ); - - $expiration = new Expiration($mockedConfig, $mockedTimeFactory); - $this->assertAttributeEquals($expectedMinAge, 'minAge', $expiration); - $this->assertAttributeEquals($expectedMaxAge, 'maxAge', $expiration); - $this->assertAttributeEquals($expectedCanPurgeToSaveSpace, 'canPurgeToSaveSpace', $expiration); - } - - - public function timestampTestData() { - return [ - [ '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) ], - ]; - } - - - /** * @dataProvider timestampTestData * * @param string $configValue |