3232use OCP \AppFramework \Http ;
3333use OCP \AppFramework \Http \StandaloneTemplateResponse ;
3434use OCP \Defaults ;
35- use OCP \EventDispatcher \IEventDispatcher ;
3635use OCP \IL10N ;
3736use OCP \IRequest ;
3837use OCP \ISession ;
4241use OCP \Security \ICrypto ;
4342use OCP \Security \ISecureRandom ;
4443use OCP \Session \Exceptions \SessionNotAvailableException ;
44+ use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
4545use Test \TestCase ;
4646
4747class ClientFlowLoginControllerTest extends TestCase {
@@ -67,7 +67,7 @@ class ClientFlowLoginControllerTest extends TestCase {
6767 private $ accessTokenMapper ;
6868 /** @var ICrypto|\PHPUnit\Framework\MockObject\MockObject */
6969 private $ crypto ;
70- /** @var IEventDispatcher |\PHPUnit\Framework\MockObject\MockObject */
70+ /** @var EventDispatcherInterface |\PHPUnit\Framework\MockObject\MockObject */
7171 private $ eventDispatcher ;
7272
7373
@@ -94,7 +94,7 @@ protected function setUp(): void {
9494 $ this ->clientMapper = $ this ->createMock (ClientMapper::class);
9595 $ this ->accessTokenMapper = $ this ->createMock (AccessTokenMapper::class);
9696 $ this ->crypto = $ this ->createMock (ICrypto::class);
97- $ this ->eventDispatcher = $ this ->createMock (IEventDispatcher ::class);
97+ $ this ->eventDispatcher = $ this ->createMock (EventDispatcherInterface ::class);
9898
9999 $ this ->clientFlowLoginController = new ClientFlowLoginController (
100100 'core ' ,
@@ -392,7 +392,7 @@ public function testGeneratePasswordWithPassword() {
392392 ->willReturn ('' );
393393
394394 $ this ->eventDispatcher ->expects ($ this ->once ())
395- ->method ('dispatchTyped ' );
395+ ->method ('dispatch ' );
396396
397397 $ expected = new Http \RedirectResponse ('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken ' );
398398 $ this ->assertEquals ($ expected , $ this ->clientFlowLoginController ->generateAppPassword ('MyStateToken ' ));
@@ -488,7 +488,7 @@ public function testGeneratePasswordWithPasswordForOauthClient($redirectUri, $re
488488 ->willReturn ($ client );
489489
490490 $ this ->eventDispatcher ->expects ($ this ->once ())
491- ->method ('dispatchTyped ' );
491+ ->method ('dispatch ' );
492492
493493 $ expected = new Http \RedirectResponse ($ redirectUrl );
494494 $ this ->assertEquals ($ expected , $ this ->clientFlowLoginController ->generateAppPassword ('MyStateToken ' , 'MyClientIdentifier ' ));
@@ -563,7 +563,7 @@ public function testGeneratePasswordWithoutPassword() {
563563 ->willReturn ('' );
564564
565565 $ this ->eventDispatcher ->expects ($ this ->once ())
566- ->method ('dispatchTyped ' );
566+ ->method ('dispatch ' );
567567
568568 $ expected = new Http \RedirectResponse ('nc://login/server:http://example.com&user:MyLoginName&password:MyGeneratedToken ' );
569569 $ this ->assertEquals ($ expected , $ this ->clientFlowLoginController ->generateAppPassword ('MyStateToken ' ));
@@ -694,7 +694,7 @@ public function testGeneratePasswordWithHttpsProxy(array $headers, $protocol, $e
694694 ->willReturnMap ($ headers );
695695
696696 $ this ->eventDispatcher ->expects ($ this ->once ())
697- ->method ('dispatchTyped ' );
697+ ->method ('dispatch ' );
698698
699699 $ expected = new Http \RedirectResponse ('nc://login/server: ' . $ expected . '://example.com&user:MyLoginName&password:MyGeneratedToken ' );
700700 $ this ->assertEquals ($ expected , $ this ->clientFlowLoginController ->generateAppPassword ('MyStateToken ' ));
0 commit comments