Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-09-13 01:37:43 +0400
committerAndreas Fischer <bantu@owncloud.com>2013-09-24 02:00:30 +0400
commitcbaf93ff92f863f4fc0991f458e126603f463b73 (patch)
tree06a074f571b585a991545b822e3034a6766dbefc /tests
parentf63c9a24eb420b75906791bb09be440f43a48f29 (diff)
Calculate dateInPast and dateInFuture.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share/share.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index a0ac55d91c5..e02b0e4354d 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -29,11 +29,8 @@ class Test_Share extends PHPUnit_Framework_TestCase {
protected $group1;
protected $group2;
protected $resharing;
-
- protected $dateInPast = '2000-01-01 00:00:00';
-
- // Picked close to the "year 2038 problem" boundary.
- protected $dateInFuture = '2037-01-01 00:00:00';
+ protected $dateInFuture;
+ protected $dateInPast;
public function setUp() {
OC_User::clearBackends();
@@ -63,6 +60,12 @@ class Test_Share extends PHPUnit_Framework_TestCase {
OC::registerShareHooks();
$this->resharing = OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes');
OC_Appconfig::setValue('core', 'shareapi_allow_resharing', 'yes');
+
+ // 20 Minutes in the past, 20 minutes in the future.
+ $now = time();
+ $dateFormat = 'Y-m-d H:i:s';
+ $this->dateInPast = date($dateFormat, $now - 20 * 60);
+ $this->dateInFuture = date($dateFormat, $now + 20 * 60);
}
public function tearDown() {