@@ -50,6 +50,9 @@ public function testLoginControllerCanBeCreated(): void
5050 public function testExceptionHandlerIsCalledWhenAuthenticateThrowsException (): void
5151 {
5252 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
53+ $ mockClient
54+ ->shouldReceive ('setLoginHint ' )
55+ ->once ();
5356 $ mockClient
5457 ->shouldReceive ('authenticate ' )
5558 ->andThrow (OpenIDConnectClientException::class);
@@ -64,12 +67,15 @@ public function testExceptionHandlerIsCalledWhenAuthenticateThrowsException(): v
6467 $ mockExceptionHandler ,
6568 );
6669
67- $ loginController ->__invoke ();
70+ $ loginController ->__invoke (new Request () );
6871 }
6972
7073 public function testExceptionHandlerIsCalledWhenRequestUserInfoDoesNotReturnAnObject (): void
7174 {
7275 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
76+ $ mockClient
77+ ->shouldReceive ('setLoginHint ' )
78+ ->once ();
7379 $ mockClient ->shouldReceive ('authenticate ' )->once ();
7480 $ mockClient
7581 ->shouldReceive ('requestUserInfo ' )
@@ -89,12 +95,15 @@ public function testExceptionHandlerIsCalledWhenRequestUserInfoDoesNotReturnAnOb
8995 $ mockExceptionHandler ,
9096 );
9197
92- $ loginController ->__invoke ();
98+ $ loginController ->__invoke (new Request () );
9399 }
94100
95101 public function testExceptionHandlerIsCalledWhenRequestUserInfoThrowsAnException (): void
96102 {
97103 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
104+ $ mockClient
105+ ->shouldReceive ('setLoginHint ' )
106+ ->once ();
98107 $ mockClient ->shouldReceive ('authenticate ' )->once ();
99108 $ mockClient
100109 ->shouldReceive ('requestUserInfo ' )
@@ -114,12 +123,15 @@ public function testExceptionHandlerIsCalledWhenRequestUserInfoThrowsAnException
114123 $ mockExceptionHandler ,
115124 );
116125
117- $ loginController ->__invoke ();
126+ $ loginController ->__invoke (new Request () );
118127 }
119128
120129 public function testExceptionHandlerIsCalledWhenRequestUserInfoThrowsAnJweDecryptException (): void
121130 {
122131 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
132+ $ mockClient
133+ ->shouldReceive ('setLoginHint ' )
134+ ->once ();
123135 $ mockClient ->shouldReceive ('authenticate ' )->once ();
124136 $ mockClient
125137 ->shouldReceive ('requestUserInfo ' )
@@ -139,12 +151,15 @@ public function testExceptionHandlerIsCalledWhenRequestUserInfoThrowsAnJweDecryp
139151 $ mockExceptionHandler ,
140152 );
141153
142- $ loginController ->__invoke ();
154+ $ loginController ->__invoke (new Request () );
143155 }
144156
145157 public function testLoginResponseIsReturnedWithUserInfo (): void
146158 {
147159 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
160+ $ mockClient
161+ ->shouldReceive ('setLoginHint ' )
162+ ->once ();
148163 $ mockClient ->shouldReceive ('authenticate ' )->once ();
149164 $ mockClient
150165 ->shouldReceive ('requestUserInfo ' )
@@ -158,7 +173,7 @@ public function testLoginResponseIsReturnedWithUserInfo(): void
158173 $ mockExceptionHandler ,
159174 );
160175
161- $ response = $ loginController ->__invoke ();
176+ $ response = $ loginController ->__invoke (new Request () );
162177
163178 $ this ->assertInstanceOf (LoginResponseInterface::class, $ response );
164179 $ this ->assertInstanceOf (Responsable::class, $ response );
@@ -167,6 +182,9 @@ public function testLoginResponseIsReturnedWithUserInfo(): void
167182 public function testUserInfoIsReturned (): void
168183 {
169184 $ mockClient = Mockery::mock (OpenIDConnectClient::class);
185+ $ mockClient
186+ ->shouldReceive ('setLoginHint ' )
187+ ->once ();
170188 $ mockClient ->shouldReceive ('authenticate ' )->once ();
171189 $ mockClient
172190 ->shouldReceive ('requestUserInfo ' )
@@ -180,7 +198,7 @@ public function testUserInfoIsReturned(): void
180198 $ mockExceptionHandler ,
181199 );
182200
183- $ loginResponse = $ loginController ->__invoke ();
201+ $ loginResponse = $ loginController ->__invoke (new Request () );
184202 $ response = $ loginResponse ->toResponse (Mockery::mock (Request::class));
185203
186204 $ this ->assertSame (json_encode ([
0 commit comments