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-05 04:27:29 +0400
committerAndreas Fischer <bantu@owncloud.com>2013-09-24 01:59:09 +0400
commitaa6aef485e99c2396e387011fcbf28dfa332f95e (patch)
treefd93ae162dd963598632122675a5508a17611326 /tests
parente8ac55a88470ac5e69a284302b5153bbeb8446f0 (diff)
Make dates test class properties.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share/share.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index cd108a24f40..c82ede2f387 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -30,6 +30,9 @@ class Test_Share extends PHPUnit_Framework_TestCase {
protected $group2;
protected $resharing;
+ protected $dateInPast = '2000-01-01 00:00:00';
+ protected $dateInFuture = '2037-01-01 00:00:00';
+
public function setUp() {
OC_User::clearBackends();
OC_User::useBackend('dummy');
@@ -270,7 +273,7 @@ class Test_Share extends PHPUnit_Framework_TestCase {
OC_User::setUserId($this->user1);
$this->assertTrue(
- OCP\Share::setExpirationDate('test', 'test.txt', '2000-01-01 00:00:00'),
+ OCP\Share::setExpirationDate('test', 'test.txt', $this->dateInPast),
'Failed asserting that user 1 successfully set an expiration date for the test.txt share.'
);
@@ -287,7 +290,7 @@ class Test_Share extends PHPUnit_Framework_TestCase {
OC_User::setUserId($this->user1);
$this->assertTrue(
- OCP\Share::setExpirationDate('test', 'test.txt', '2037-01-01 00:00:00'),
+ OCP\Share::setExpirationDate('test', 'test.txt', $this->dateInFuture),
'Failed asserting that user 1 successfully set an expiration date for the test.txt share.'
);