From ca133ea2cc08fd0e6df4608d63e9f3f7be95de39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 12 Nov 2020 08:43:03 +0100 Subject: [PATCH] Add explicit time to test date for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/lib/Share20/ManagerTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 12b36af64d..735e62d843 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);