diff options
author | Joas Schilling <coding@schilljs.com> | 2022-02-23 10:40:58 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-02-23 11:01:58 +0100 |
commit | d078d536835fc75a79b5381a628cefb92ae74886 (patch) | |
tree | 65dac66485b3562fa04f8fce4fabcac69a36ce74 /tests/lib/AppFramework/Controller/ControllerTest.php | |
parent | cc6653e45c86e8019846274b04154c96e34632cf (diff) | |
download | nextcloud-server-d078d536835fc75a79b5381a628cefb92ae74886.tar.gz nextcloud-server-d078d536835fc75a79b5381a628cefb92ae74886.zip |
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/AppFramework/Controller/ControllerTest.php')
-rw-r--r-- | tests/lib/AppFramework/Controller/ControllerTest.php | 12 |
1 files changed, 5 insertions, 7 deletions
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(); |