diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 16:30:41 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 21:54:56 +0100 |
commit | 7785c3752fbfef792cd33dc5da2ee63e8263b9fa (patch) | |
tree | 66b68c5f9ce30ec87c51aebc7d9ffe0c14b30d2f /apps/federatedfilesharing/tests | |
parent | ede723f1b19c4c1afb7627af85c1e2f8d8a31386 (diff) | |
download | nextcloud-server-7785c3752fbfef792cd33dc5da2ee63e8263b9fa.tar.gz nextcloud-server-7785c3752fbfef792cd33dc5da2ee63e8263b9fa.zip |
Remove deprecated HTTPHelper
* Remove the HTTP Helper
* Remove from Server Containter
* Removed legacy share tests that use it
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r-- | apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index d04c75b9a86..035b7da15ca 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -85,13 +85,6 @@ class RequestHandlerControllerTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); \OC\Share\Share::registerBackend('test', 'Test\Share\Backend'); - $config = $this->getMockBuilder(IConfig::class) - ->disableOriginalConstructor()->getMock(); - $clientService = $this->getMockBuilder(IClientService::class)->getMock(); - $httpHelperMock = $this->getMockBuilder('\OC\HTTPHelper') - ->setConstructorArgs([$config, $clientService]) - ->getMock(); - $httpHelperMock->expects($this->any())->method('post')->with($this->anything())->will($this->returnValue(true)); $this->share = $this->getMockBuilder(IShare::class)->getMock(); $this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider') ->disableOriginalConstructor()->getMock(); @@ -110,8 +103,6 @@ class RequestHandlerControllerTest extends TestCase { $this->cloudIdManager = new CloudIdManager(); - $this->registerHttpHelper($httpHelperMock); - $this->s2s = new RequestHandlerController( 'federatedfilesharing', \OC::$server->getRequest(), @@ -134,33 +125,10 @@ class RequestHandlerControllerTest extends TestCase { $query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share`'); $query->execute(); - $this->restoreHttpHelper(); - parent::tearDown(); } /** - * Register an http helper mock for testing purposes. - * @param \OC\HTTPHelper $httpHelper helper mock - */ - private function registerHttpHelper($httpHelper) { - $this->oldHttpHelper = \OC::$server->query('HTTPHelper'); - \OC::$server->registerService('HTTPHelper', function ($c) use ($httpHelper) { - return $httpHelper; - }); - } - - /** - * Restore the original http helper - */ - private function restoreHttpHelper() { - $oldHttpHelper = $this->oldHttpHelper; - \OC::$server->registerService('HTTPHelper', function ($c) use ($oldHttpHelper) { - return $oldHttpHelper; - }); - } - - /** * @medium */ function testCreateShare() { |