summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share20/managertest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php
index 2c40bf65c2c..d388d56ce3d 100644
--- a/tests/lib/share20/managertest.php
+++ b/tests/lib/share20/managertest.php
@@ -746,10 +746,25 @@ class ManagerTest extends \Test\TestCase {
$this->config->method('getAppValue')
->will($this->returnValueMap([
+ ['core', 'shareapi_default_expire_date', 'no', 'yes'],
+ ['core', 'shareapi_enforce_expire_date', 'no', 'yes'],
+ ]));
+
+ $this->invokePrivate($this->manager, 'validateExpirationDate', [$share]);
+ }
+
+ public function testvalidateExpirationDateEnforceButNotEnabledAndNotSet() {
+ $share = $this->manager->newShare();
+ $share->setProviderId('foo')->setId('bar');
+
+ $this->config->method('getAppValue')
+ ->will($this->returnValueMap([
['core', 'shareapi_enforce_expire_date', 'no', 'yes'],
]));
$this->invokePrivate($this->manager, 'validateExpirationDate', [$share]);
+
+ $this->assertNull($share->getExpirationDate());
}
public function testvalidateExpirationDateEnforceButNotSetNewShare() {