[Pkg-owncloud-commits] [owncloud] 181/205: Do not rely on actual time in unit tests

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:37:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 422d088bb973c6d47475ea0832c17b4e2639a29b
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Mon Jun 29 17:14:24 2015 +0200

    Do not rely on actual time in unit tests
    
    Ref https://github.com/owncloud/core/pull/17238#issuecomment-116724055
---
 tests/lib/updater.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/lib/updater.php b/tests/lib/updater.php
index 8d6a9d6..2857707 100644
--- a/tests/lib/updater.php
+++ b/tests/lib/updater.php
@@ -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')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list