@@ -56,7 +56,7 @@ public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfSimpleIsNo
56
56
$ this ->successHandler ->expects ($ this ->once ())
57
57
->method ('onAuthenticationSuccess ' )
58
58
->with ($ this ->request , $ this ->token )
59
- ->will ($ this ->returnValue ( $ this -> response ) );
59
+ ->willReturn ($ this ->response );
60
60
61
61
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
62
62
$ result = $ handler ->onAuthenticationSuccess ($ this ->request , $ this ->token );
@@ -73,7 +73,7 @@ public function testOnAuthenticationSuccessCallsSimpleAuthenticator()
73
73
$ authenticator ->expects ($ this ->once ())
74
74
->method ('onAuthenticationSuccess ' )
75
75
->with ($ this ->request , $ this ->token )
76
- ->will ($ this ->returnValue ( $ this -> response ) );
76
+ ->willReturn ($ this ->response );
77
77
78
78
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
79
79
$ result = $ handler ->onAuthenticationSuccess ($ this ->request , $ this ->token );
@@ -94,7 +94,7 @@ public function testOnAuthenticationSuccessThrowsAnExceptionIfNonResponseIsRetur
94
94
$ authenticator ->expects ($ this ->once ())
95
95
->method ('onAuthenticationSuccess ' )
96
96
->with ($ this ->request , $ this ->token )
97
- ->will ( $ this -> returnValue ( new \stdClass () ));
97
+ ->willReturn ( new \stdClass ());
98
98
99
99
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
100
100
$ handler ->onAuthenticationSuccess ($ this ->request , $ this ->token );
@@ -105,13 +105,13 @@ public function testOnAuthenticationSuccessFallsBackToDefaultHandlerIfNullIsRetu
105
105
$ this ->successHandler ->expects ($ this ->once ())
106
106
->method ('onAuthenticationSuccess ' )
107
107
->with ($ this ->request , $ this ->token )
108
- ->will ($ this ->returnValue ( $ this -> response ) );
108
+ ->willReturn ($ this ->response );
109
109
110
110
$ authenticator = $ this ->getMockForAbstractClass ('Symfony\Component\Security\Http\Tests\TestSuccessHandlerInterface ' );
111
111
$ authenticator ->expects ($ this ->once ())
112
112
->method ('onAuthenticationSuccess ' )
113
113
->with ($ this ->request , $ this ->token )
114
- ->will ( $ this -> returnValue ( null ) );
114
+ ->willReturn ( null );
115
115
116
116
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
117
117
$ result = $ handler ->onAuthenticationSuccess ($ this ->request , $ this ->token );
@@ -126,7 +126,7 @@ public function testOnAuthenticationFailureFallsBackToDefaultHandlerIfSimpleIsNo
126
126
$ this ->failureHandler ->expects ($ this ->once ())
127
127
->method ('onAuthenticationFailure ' )
128
128
->with ($ this ->request , $ this ->authenticationException )
129
- ->will ($ this ->returnValue ( $ this -> response ) );
129
+ ->willReturn ($ this ->response );
130
130
131
131
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
132
132
$ result = $ handler ->onAuthenticationFailure ($ this ->request , $ this ->authenticationException );
@@ -143,7 +143,7 @@ public function testOnAuthenticationFailureCallsSimpleAuthenticator()
143
143
$ authenticator ->expects ($ this ->once ())
144
144
->method ('onAuthenticationFailure ' )
145
145
->with ($ this ->request , $ this ->authenticationException )
146
- ->will ($ this ->returnValue ( $ this -> response ) );
146
+ ->willReturn ($ this ->response );
147
147
148
148
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
149
149
$ result = $ handler ->onAuthenticationFailure ($ this ->request , $ this ->authenticationException );
@@ -164,7 +164,7 @@ public function testOnAuthenticationFailureThrowsAnExceptionIfNonResponseIsRetur
164
164
$ authenticator ->expects ($ this ->once ())
165
165
->method ('onAuthenticationFailure ' )
166
166
->with ($ this ->request , $ this ->authenticationException )
167
- ->will ( $ this -> returnValue ( new \stdClass () ));
167
+ ->willReturn ( new \stdClass ());
168
168
169
169
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
170
170
$ handler ->onAuthenticationFailure ($ this ->request , $ this ->authenticationException );
@@ -175,13 +175,13 @@ public function testOnAuthenticationFailureFallsBackToDefaultHandlerIfNullIsRetu
175
175
$ this ->failureHandler ->expects ($ this ->once ())
176
176
->method ('onAuthenticationFailure ' )
177
177
->with ($ this ->request , $ this ->authenticationException )
178
- ->will ($ this ->returnValue ( $ this -> response ) );
178
+ ->willReturn ($ this ->response );
179
179
180
180
$ authenticator = $ this ->getMockForAbstractClass ('Symfony\Component\Security\Http\Tests\TestFailureHandlerInterface ' );
181
181
$ authenticator ->expects ($ this ->once ())
182
182
->method ('onAuthenticationFailure ' )
183
183
->with ($ this ->request , $ this ->authenticationException )
184
- ->will ( $ this -> returnValue ( null ) );
184
+ ->willReturn ( null );
185
185
186
186
$ handler = new SimpleAuthenticationHandler ($ authenticator , $ this ->successHandler , $ this ->failureHandler );
187
187
$ result = $ handler ->onAuthenticationFailure ($ this ->request , $ this ->authenticationException );
0 commit comments