Skip to content

Commit f8fec37

Browse files
committed
fixed obsolete getMock() usage
1 parent 459c81e commit f8fec37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Firewall/SwitchUserListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function testSwitchUserIsDisallowed()
233233
public function testSwitchUser()
234234
{
235235
$token = $this->getToken(array(new Role('the role')));
236-
$user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');
236+
$user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock();
237237
$user->expects($this->any())->method('getRoles')->will($this->returnValue(array()));
238238

239239
$this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token));
@@ -263,7 +263,7 @@ public function testSwitchUser()
263263
public function testSwitchUserKeepsOtherQueryStringParameters()
264264
{
265265
$token = $this->getToken(array(new Role('the role')));
266-
$user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');
266+
$user = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock();
267267
$user->expects($this->any())->method('getRoles')->will($this->returnValue(array()));
268268

269269
$this->tokenStorage->expects($this->any())->method('getToken')->will($this->returnValue($token));

0 commit comments

Comments
 (0)