Do not rely on actual time in unit tests

Ref https://github.com/owncloud/core/pull/17238#issuecomment-116724055
This commit is contained in:
Lukas Reschke 2015-06-29 17:14:24 +02:00
parent b88a0e7080
commit 422d088bb9

View file

@ -149,7 +149,7 @@ class UpdaterTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('setAppValue')
->with('core', 'lastupdatedat', time());
->with('core', 'lastupdatedat', $this->isType('integer'));
$this->config
->expects($this->at(3))
->method('getAppValue')
@ -190,7 +190,7 @@ class UpdaterTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('setAppValue')
->with('core', 'lastupdatedat', time());
->with('core', 'lastupdatedat', $this->isType('integer'));
$this->config
->expects($this->at(3))
->method('getAppValue')
@ -232,7 +232,7 @@ class UpdaterTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('setAppValue')
->with('core', 'lastupdatedat', time());
->with('core', 'lastupdatedat', $this->isType('integer'));
$this->config
->expects($this->at(3))
->method('getAppValue')
@ -280,7 +280,7 @@ class UpdaterTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('setAppValue')
->with('core', 'lastupdatedat', time());
->with('core', 'lastupdatedat', $this->isType('integer'));
$this->config
->expects($this->at(3))
->method('getAppValue')
@ -319,7 +319,7 @@ class UpdaterTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('setAppValue')
->with('core', 'lastupdatedat', time());
->with('core', 'lastupdatedat', $this->isType('integer'));
$this->config
->expects($this->at(3))
->method('getAppValue')