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/ControllerTest.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests/lib/AppFramework/Controller/ControllerTest.php') diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 1d72482e75d..4d36fcadce1 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -29,6 +29,8 @@ use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\JSONResponse; use OCP\IConfig; use OCP\IRequest; +use OCP\IRequestId; +use OC\AppFramework\DependencyInjection\DIContainer; class ChildController extends Controller { public function __construct($appName, $request) { @@ -75,15 +77,11 @@ class ControllerTest extends \Test\TestCase { 'session' => ['sezession' => 'kein'], 'method' => 'hi', ], - $this->getMockBuilder('\OCP\Security\ISecureRandom') - ->disableOriginalConstructor() - ->getMock(), - $this->getMockBuilder(IConfig::class) - ->disableOriginalConstructor() - ->getMock() + $this->createMock(IRequestId::class), + $this->createMock(IConfig::class) ); - $this->app = $this->getMockBuilder('OC\AppFramework\DependencyInjection\DIContainer') + $this->app = $this->getMockBuilder(DIContainer::class) ->setMethods(['getAppName']) ->setConstructorArgs(['test']) ->getMock(); -- cgit v1.2.3