From d078d536835fc75a79b5381a628cefb92ae74886 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 23 Feb 2022 10:40:58 +0100 Subject: Fix tests Signed-off-by: Joas Schilling --- tests/lib/AppFramework/Controller/ApiControllerTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/lib/AppFramework/Controller/ApiControllerTest.php') diff --git a/tests/lib/AppFramework/Controller/ApiControllerTest.php b/tests/lib/AppFramework/Controller/ApiControllerTest.php index 71eb97b94da..975b92c5b96 100644 --- a/tests/lib/AppFramework/Controller/ApiControllerTest.php +++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php @@ -26,6 +26,7 @@ namespace Test\AppFramework\Controller; use OC\AppFramework\Http\Request; use OCP\AppFramework\ApiController; use OCP\IConfig; +use OCP\IRequestId; class ChildApiController extends ApiController { }; @@ -38,12 +39,8 @@ class ApiControllerTest extends \Test\TestCase { public function testCors() { $request = new Request( ['server' => ['HTTP_ORIGIN' => 'test']], - $this->getMockBuilder('\OCP\Security\ISecureRandom') - ->disableOriginalConstructor() - ->getMock(), - $this->getMockBuilder(IConfig::class) - ->disableOriginalConstructor() - ->getMock() + $this->createMock(IRequestId::class), + $this->createMock(IConfig::class) ); $this->controller = new ChildApiController('app', $request, 'verbs', 'headers', 100); -- cgit v1.2.3