diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:53:49 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:53:49 +0100 |
commit | a57c25800dcd39387a9a831ef8f436a6bebb8e72 (patch) | |
tree | 536a2ddb082b1cd251fdc04ff8d9e5700593f805 /Core/Tests/Encoder/UserPasswordEncoderTest.php | |
parent | 05b01b879902a75c64b610a28d1f0dc0bee58c91 (diff) | |
parent | 674b38ff1ae98e993fd18e599120ead43705c4bc (diff) | |
download | symfony-security-a57c25800dcd39387a9a831ef8f436a6bebb8e72.zip symfony-security-a57c25800dcd39387a9a831ef8f436a6bebb8e72.tar.gz symfony-security-a57c25800dcd39387a9a831ef8f436a6bebb8e72.tar.bz2 |
Merge branch '2.8' into 3.1
* 2.8:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
Diffstat (limited to 'Core/Tests/Encoder/UserPasswordEncoderTest.php')
-rw-r--r-- | Core/Tests/Encoder/UserPasswordEncoderTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Core/Tests/Encoder/UserPasswordEncoderTest.php b/Core/Tests/Encoder/UserPasswordEncoderTest.php index 590652d..e8adb9b 100644 --- a/Core/Tests/Encoder/UserPasswordEncoderTest.php +++ b/Core/Tests/Encoder/UserPasswordEncoderTest.php @@ -17,18 +17,18 @@ class UserPasswordEncoderTest extends \PHPUnit_Framework_TestCase { public function testEncodePassword() { - $userMock = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); + $userMock = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $userMock->expects($this->any()) ->method('getSalt') ->will($this->returnValue('userSalt')); - $mockEncoder = $this->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); + $mockEncoder = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')->getMock(); $mockEncoder->expects($this->any()) ->method('encodePassword') ->with($this->equalTo('plainPassword'), $this->equalTo('userSalt')) ->will($this->returnValue('encodedPassword')); - $mockEncoderFactory = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); + $mockEncoderFactory = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface')->getMock(); $mockEncoderFactory->expects($this->any()) ->method('getEncoder') ->with($this->equalTo($userMock)) @@ -42,7 +42,7 @@ class UserPasswordEncoderTest extends \PHPUnit_Framework_TestCase public function testIsPasswordValid() { - $userMock = $this->getMock('Symfony\Component\Security\Core\User\UserInterface'); + $userMock = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock(); $userMock->expects($this->any()) ->method('getSalt') ->will($this->returnValue('userSalt')); @@ -50,13 +50,13 @@ class UserPasswordEncoderTest extends \PHPUnit_Framework_TestCase ->method('getPassword') ->will($this->returnValue('encodedPassword')); - $mockEncoder = $this->getMock('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface'); + $mockEncoder = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface')->getMock(); $mockEncoder->expects($this->any()) ->method('isPasswordValid') ->with($this->equalTo('encodedPassword'), $this->equalTo('plainPassword'), $this->equalTo('userSalt')) ->will($this->returnValue(true)); - $mockEncoderFactory = $this->getMock('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface'); + $mockEncoderFactory = $this->getMockBuilder('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface')->getMock(); $mockEncoderFactory->expects($this->any()) ->method('getEncoder') ->with($this->equalTo($userMock)) |