summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php32
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() {