diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-12 08:43:03 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-16 13:16:56 +0000 |
commit | 709abd4fc7a152f0085ef87fa2c63a78da6dea52 (patch) | |
tree | 9caa6a3f275c9beb23612a9a51d79d4561390fb5 /tests | |
parent | 731cce45426806134a61c922166826fb017f189a (diff) | |
download | nextcloud-server-709abd4fc7a152f0085ef87fa2c63a78da6dea52.tar.gz nextcloud-server-709abd4fc7a152f0085ef87fa2c63a78da6dea52.zip |
Add explicit time to test date for clarity
This shows in a clearer way that the expected expiration date is the
original one, but without time.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index a4647cfb9c6..1701f8f0137 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -874,10 +874,10 @@ class ManagerTest extends \Test\TestCase { public function testValidateExpirationDateEnforceValid() { $future = new \DateTime(); $future->add(new \DateInterval('P2D')); - $future->setTime(0,0,0); + $future->setTime(1,2,3); $expected = clone $future; - $future->setTime(1,2,3); + $expected->setTime(0,0,0); $share = $this->manager->newShare(); $share->setExpirationDate($future); @@ -903,6 +903,7 @@ class ManagerTest extends \Test\TestCase { public function testValidateExpirationDateNoDefault() { $date = new \DateTime(); $date->add(new \DateInterval('P5D')); + $date->setTime(1,2,3); $expected = clone $date; $expected->setTime(0,0,0); @@ -964,9 +965,10 @@ class ManagerTest extends \Test\TestCase { public function testValidateExpirationDateDefault() { $future = new \DateTime(); $future->add(new \DateInterval('P5D')); - $future->setTime(0,0,0); + $future->setTime(1,2,3); $expected = clone $future; + $expected->setTime(0,0,0); $share = $this->manager->newShare(); $share->setExpirationDate($future); |