Skip to content
Snippets Groups Projects
Unverified Commit b7dd2074 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

FIX


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

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent 673beefb
No related branches found
No related tags found
No related merge requests found
...@@ -112,7 +112,7 @@ class ExpirationTest extends \Test\TestCase { ...@@ -112,7 +112,7 @@ class ExpirationTest extends \Test\TestCase {
$expiration = new Expiration($mockedConfig, $mockedTimeFactory); $expiration = new Expiration($mockedConfig, $mockedTimeFactory);
$actualResult = $expiration->isExpired($timestamp, $quotaExceeded); $actualResult = $expiration->isExpired($timestamp, $quotaExceeded);
$this->assertEquals($expectedResult, $actualResult); $this->assertEquals($expectedResult, $actualResult);
} }
...@@ -131,41 +131,6 @@ class ExpirationTest extends \Test\TestCase { ...@@ -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 { ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment