diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index 3fdae38e363a7..1243baf0cd403 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -66,6 +66,7 @@ private function buildUpdateUrl(string $baseUrl, int $lastUpdateDate): string { } public function testCheckInCache(): void { + $time = time(); $expectedResult = [ 'version' => '8.0.4.2', 'versionstring' => 'ownCloud 8.0.4', @@ -83,7 +84,7 @@ public function testCheckInCache(): void { ->expects($this->once()) ->method('getValueInt') ->with('core', 'lastupdatedat') - ->willReturn(time()); + ->willReturn($time); $this->config ->expects($this->once()) ->method('getAppValue') @@ -284,7 +285,7 @@ public function testCheckWithEmptyInvalidXmlResponse(): void { ->with('core', 'lastupdatedat') ->willReturnOnConsecutiveCalls( 0, - time(), + $lastUpdateDate, ); $this->config ->expects($this->exactly(2)) @@ -299,7 +300,7 @@ public function testCheckWithEmptyInvalidXmlResponse(): void { $this->appConfig ->expects($this->once()) ->method('setValueInt') - ->with('core', 'lastupdatedat', time()); + ->with('core', 'lastupdatedat', $lastUpdateDate); $this->config ->expects($this->once()) ->method('setAppValue')