diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-02 10:44:55 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-02 10:44:55 +0100 |
commit | 76b1dee499771c1b5327b4b7792e98fd41049096 (patch) | |
tree | 8a69cabd032979139c1ed8d6d95972b99fbfe4f7 /apps/federatedfilesharing/tests/NotificationsTest.php | |
parent | 42b0a0d2afe95b974545436e112a1d97edaeeb1a (diff) | |
download | nextcloud-server-76b1dee499771c1b5327b4b7792e98fd41049096.tar.gz nextcloud-server-76b1dee499771c1b5327b4b7792e98fd41049096.zip |
use https by default if no protocol is given. Only use unsecure connection if it is explicitely given
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/tests/NotificationsTest.php')
-rw-r--r-- | apps/federatedfilesharing/tests/NotificationsTest.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index dbcb1ef4e87..a5f5c6bc078 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -58,7 +58,7 @@ class NotificationsTest extends \Test\TestCase { /** * get instance of Notifications class - * + * * @param array $mockedMethods methods which should be mocked * @return Notifications | \PHPUnit_Framework_MockObject_MockObject */ @@ -81,7 +81,7 @@ class NotificationsTest extends \Test\TestCase { ] )->setMethods($mockedMethods)->getMock(); } - + return $instance; } @@ -94,7 +94,7 @@ class NotificationsTest extends \Test\TestCase { * @param bool $expected */ public function testSendUpdateToRemote($try, $httpRequestResult, $expected) { - $remote = 'remote'; + $remote = 'http://remote'; $id = 42; $timestamp = 63576; $token = 'token'; @@ -106,9 +106,6 @@ class NotificationsTest extends \Test\TestCase { ->with($remote, '/'.$id.'/unshare', ['token' => $token, 'data1Key' => 'data1Value']) ->willReturn($httpRequestResult); - $this->addressHandler->expects($this->once())->method('removeProtocolFromUrl') - ->with($remote)->willReturn($remote); - // only add background job on first try if ($try === 0 && $expected === false) { $this->jobList->expects($this->once())->method('add') |