the assertAttributeEquals got removed.
So we can't run these tests anymore.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-11-30 12:29:31 +01:00
parent 673beefb41
commit b7dd2074ab
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 1 additions and 72 deletions

View File

@ -112,7 +112,7 @@ class ExpirationTest extends \Test\TestCase {
$expiration = new Expiration($mockedConfig, $mockedTimeFactory);
$actualResult = $expiration->isExpired($timestamp, $quotaExceeded);
$this->assertEquals($expectedResult, $actualResult);
}
@ -131,41 +131,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
*

View File

@ -118,42 +118,6 @@ class ExpirationTest extends \Test\TestCase {
}
public function configData() {
return [
[ 'disabled', null, null, null],
[ 'auto', Expiration::NO_OBLIGATION, Expiration::NO_OBLIGATION, true ],
[ 'auto,auto', Expiration::NO_OBLIGATION, Expiration::NO_OBLIGATION, true ],
[ 'auto, auto', Expiration::NO_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 ],
[ 'g,a,r,b,a,g,e', Expiration::NO_OBLIGATION, Expiration::NO_OBLIGATION, true ],
[ '-3,8', Expiration::NO_OBLIGATION, Expiration::NO_OBLIGATION, true ]
];
}
/**
* @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);
}
/**
* @param int $time
* @return ITimeFactory|MockObject