From f88fb63b331e3261f17a1c85f59f90eb06e7cfc9 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 22 Mar 2019 13:10:22 +0545 Subject: [PATCH] Make sure testvalidateExpirationDateEnforceToFarIntoFuture unit test will fail if no exception is thrown --- tests/lib/Share20/ManagerTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 2e04f54ecd26..2034987cc43e 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -975,6 +975,7 @@ public function testvalidateExpirationDateEnforceToFarIntoFuture() { try { $this->invokePrivate($this->manager, 'validateExpirationDate', [$share]); + $this->fail("expected GenericShareException but no exception was thrown"); } catch (\OCP\Share\Exceptions\GenericShareException $e) { $this->assertEquals('Cannot set expiration date more than 3 days in the future', $e->getMessage()); $this->assertEquals('Cannot set expiration date more than 3 days in the future', $e->getHint());