Skip to content

Commit d66ecb8

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: [Tests] Change to willThrowException [Console] fix PHPDoc in Command Fix wrong calls to clearstatcache Add Vietnamese translation for validators Allow running PHPUnit with "xdebug.scream" ON [Yaml] detect circular references
2 parents 9980771 + bd780a1 commit d66ecb8

6 files changed

+13
-13
lines changed

Tests/Firewall/AbstractPreAuthenticatedListenerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testHandleWhenAuthenticationFails()
9090
->expects($this->once())
9191
->method('authenticate')
9292
->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken'))
93-
->will($this->throwException($exception))
93+
->willThrowException($exception)
9494
;
9595

9696
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
@@ -138,7 +138,7 @@ public function testHandleWhenAuthenticationFailsWithDifferentToken()
138138
->expects($this->once())
139139
->method('authenticate')
140140
->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken'))
141-
->will($this->throwException($exception))
141+
->willThrowException($exception)
142142
;
143143

144144
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(
@@ -228,7 +228,7 @@ public function testHandleWithAnInvalidSimilarToken()
228228
->expects($this->once())
229229
->method('authenticate')
230230
->with($this->isInstanceOf('Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken'))
231-
->will($this->throwException($exception))
231+
->willThrowException($exception)
232232
;
233233

234234
$listener = $this->getMockForAbstractClass('Symfony\Component\Security\Http\Firewall\AbstractPreAuthenticatedListener', array(

Tests/Firewall/RememberMeListenerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenti
9090
$manager
9191
->expects($this->once())
9292
->method('authenticate')
93-
->will($this->throwException($exception))
93+
->willThrowException($exception)
9494
;
9595

9696
$event = $this->getGetResponseEvent();
@@ -132,7 +132,7 @@ public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExcepti
132132
$manager
133133
->expects($this->once())
134134
->method('authenticate')
135-
->will($this->throwException($exception))
135+
->willThrowException($exception)
136136
;
137137

138138
$event = $this->getGetResponseEvent();
@@ -159,7 +159,7 @@ public function testOnCoreSecurityAuthenticationExceptionDuringAutoLoginTriggers
159159
$service
160160
->expects($this->once())
161161
->method('autoLogin')
162-
->will($this->throwException($exception))
162+
->willThrowException($exception)
163163
;
164164

165165
$service

Tests/Firewall/SimplePreAuthenticationListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testHandlecatchAuthenticationException()
7272
->expects($this->once())
7373
->method('authenticate')
7474
->with($this->equalTo($this->token))
75-
->will($this->throwException($exception))
75+
->willThrowException($exception)
7676
;
7777

7878
$this->tokenStorage->expects($this->once())

Tests/HttpUtilsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function testCheckRequestPathWithUrlMatcherAndResourceNotFound()
200200
->expects($this->any())
201201
->method('match')
202202
->with('/')
203-
->will($this->throwException(new ResourceNotFoundException()))
203+
->willThrowException(new ResourceNotFoundException())
204204
;
205205

206206
$utils = new HttpUtils(null, $urlMatcher);
@@ -215,7 +215,7 @@ public function testCheckRequestPathWithUrlMatcherAndMethodNotAllowed()
215215
->expects($this->any())
216216
->method('matchRequest')
217217
->with($request)
218-
->will($this->throwException(new MethodNotAllowedException(array())))
218+
->willThrowException(new MethodNotAllowedException(array()))
219219
;
220220

221221
$utils = new HttpUtils(null, $urlMatcher);
@@ -260,7 +260,7 @@ public function testCheckRequestPathWithUrlMatcherLoadingException()
260260
$urlMatcher
261261
->expects($this->any())
262262
->method('match')
263-
->will($this->throwException(new \RuntimeException()))
263+
->willThrowException(new \RuntimeException())
264264
;
265265

266266
$utils = new HttpUtils(null, $urlMatcher);

Tests/RememberMe/PersistentTokenBasedRememberMeServicesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testAutoLoginThrowsExceptionOnNonExistentToken()
6565
$tokenProvider
6666
->expects($this->once())
6767
->method('loadTokenBySeries')
68-
->will($this->throwException(new TokenNotFoundException('Token not found.')))
68+
->willThrowException(new TokenNotFoundException('Token not found.'))
6969
;
7070
$service->setTokenProvider($tokenProvider);
7171

@@ -91,7 +91,7 @@ public function testAutoLoginReturnsNullOnNonExistentUser()
9191
$userProvider
9292
->expects($this->once())
9393
->method('loadUserByUsername')
94-
->will($this->throwException(new UsernameNotFoundException('user not found')))
94+
->willThrowException(new UsernameNotFoundException('user not found'))
9595
;
9696

9797
$this->assertNull($service->autoLogin($request));

Tests/RememberMe/TokenBasedRememberMeServicesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testAutoLoginThrowsExceptionOnNonExistentUser()
4949
$userProvider
5050
->expects($this->once())
5151
->method('loadUserByUsername')
52-
->will($this->throwException(new UsernameNotFoundException('user not found')))
52+
->willThrowException(new UsernameNotFoundException('user not found'))
5353
;
5454

5555
$this->assertNull($service->autoLogin($request));

0 commit comments

Comments
 (0)