FIX
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:
parent
673beefb41
commit
b7dd2074ab
|
@ -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
|
* @dataProvider timestampTestData
|
||||||
*
|
*
|
||||||
|
|
|
@ -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
|
* @param int $time
|
||||||
* @return ITimeFactory|MockObject
|
* @return ITimeFactory|MockObject
|
||||||
|
|
Loading…
Reference in New Issue