summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php5
-rw-r--r--tests/lib/Settings/Admin/SharingTest.php16
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index cc4bbee2d8d..f80bffcb480 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -305,7 +305,10 @@ class RequestTest extends \Test\TestCase {
$vars = array(
'put' => $data,
'method' => 'PUT',
- 'server' => array('CONTENT_TYPE' => 'image/png'),
+ 'server' => [
+ 'CONTENT_TYPE' => 'image/png',
+ 'CONTENT_LENGTH' => strlen($data)
+ ],
);
$request = new Request(
diff --git a/tests/lib/Settings/Admin/SharingTest.php b/tests/lib/Settings/Admin/SharingTest.php
index 122bf2b6caf..0bf03559683 100644
--- a/tests/lib/Settings/Admin/SharingTest.php
+++ b/tests/lib/Settings/Admin/SharingTest.php
@@ -104,6 +104,11 @@ class SharingTest extends TestCase {
->method('getAppValue')
->with('core', 'shareapi_public_link_disclaimertext', null)
->willReturn('Lorem ipsum');
+ $this->config
+ ->expects($this->at(12))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_enable_link_password_by_default', 'no')
+ ->willReturn('yes');
$expected = new TemplateResponse(
'settings',
@@ -122,7 +127,8 @@ class SharingTest extends TestCase {
'shareEnforceExpireDate' => 'no',
'shareExcludeGroups' => false,
'shareExcludedGroupsList' => '',
- 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'enableLinkPasswordByDefault' => 'yes'
],
''
);
@@ -191,6 +197,11 @@ class SharingTest extends TestCase {
->method('getAppValue')
->with('core', 'shareapi_public_link_disclaimertext', null)
->willReturn('Lorem ipsum');
+ $this->config
+ ->expects($this->at(12))
+ ->method('getAppValue')
+ ->with('core', 'shareapi_enable_link_password_by_default', 'no')
+ ->willReturn('yes');
$expected = new TemplateResponse(
'settings',
@@ -209,7 +220,8 @@ class SharingTest extends TestCase {
'shareEnforceExpireDate' => 'no',
'shareExcludeGroups' => true,
'shareExcludedGroupsList' => 'NoSharers|OtherNoSharers',
- 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'publicShareDisclaimerText' => 'Lorem ipsum',
+ 'enableLinkPasswordByDefault' => 'yes'
],
''
);