diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-07-12 14:03:29 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-07-14 16:39:48 +0200 |
commit | 33a685bc41628e1236015bd79cc8f82b9cb6cabf (patch) | |
tree | be3b1a6cd391db7f48e1111b4b96960e9ce53c3a /apps/federatedfilesharing/tests | |
parent | 1394b0afb9b1d3d7c8952faea85873e731ccb801 (diff) | |
download | nextcloud-server-33a685bc41628e1236015bd79cc8f82b9cb6cabf.tar.gz nextcloud-server-33a685bc41628e1236015bd79cc8f82b9cb6cabf.zip |
continue to accept the URL of the remote server instead of the federated cloud id
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r-- | apps/federatedfilesharing/tests/Controller/SaveToOwnCloudControllerTest.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/SaveToOwnCloudControllerTest.php b/apps/federatedfilesharing/tests/Controller/SaveToOwnCloudControllerTest.php index 24bc18d5644..9189ac76601 100644 --- a/apps/federatedfilesharing/tests/Controller/SaveToOwnCloudControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/SaveToOwnCloudControllerTest.php @@ -28,6 +28,7 @@ use OCA\FederatedFileSharing\Controller\SaveToOwnCloudController; use OCA\FederatedFileSharing\FederatedShareProvider; use OCP\AppFramework\Http; use OCP\Files\IRootFolder; +use OCP\ISession; use OCP\IUserManager; use OCP\Share; use OCP\Share\IManager; @@ -56,6 +57,9 @@ class SaveToOwnCloudControllerTest extends \Test\TestCase { /** @var IUserManager | \PHPUnit_Framework_MockObject_MockObject */ private $userManager; + /** @var ISession | \PHPUnit_Framework_MockObject_MockObject */ + private $session; + /** @var IShare */ private $share; @@ -71,12 +75,14 @@ class SaveToOwnCloudControllerTest extends \Test\TestCase { $this->rootFolder = $this->getMock('OCP\Files\IRootFolder'); $this->userManager = $this->getMock('OCP\IUserManager'); $this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager); + $this->session = $this->getMock('OCP\ISession'); $this->controller = new SaveToOwnCloudController( 'federatedfilesharing', $this->request, $this->federatedShareProvider, $this->shareManager, - $this->addressHandler + $this->addressHandler, + $this->session ); } @@ -101,9 +107,9 @@ class SaveToOwnCloudControllerTest extends \Test\TestCase { throw new HintException($expectedReturnData, $expectedReturnData); } ); - + $share = $this->share; - + $this->shareManager->expects($this->any())->method('getShareByToken') ->with($token) ->willReturnCallback( @@ -114,7 +120,7 @@ class SaveToOwnCloudControllerTest extends \Test\TestCase { throw new HintException($expectedReturnData, $expectedReturnData); } ); - + $this->federatedShareProvider->expects($this->any())->method('create') ->with($share) ->willReturnCallback( @@ -141,7 +147,7 @@ class SaveToOwnCloudControllerTest extends \Test\TestCase { $this->assertSame($expectedReturnData, $result->getData()['remoteUrl']); } - + } public function dataTestSaveToOwnCloud() { |