Автор: Johannes M. Schmitt (schmittjoh@gmail.com)
Автор: Jeremy Mikola (jmikola@gmail.com)
Наследование: implements Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface
Пример #1
0
 public function testGetEncoderWithGenericAccount()
 {
     $genericFactory = $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface');
     $encoder = $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface');
     $genericFactory->expects($this->once())->method('getEncoder')->will($this->returnValue($encoder));
     $factory = new EncoderFactory(null, false, 1, $genericFactory);
     $this->assertSame($encoder, $factory->getEncoder($this->getMock('Symfony\\Component\\Security\\Core\\User\\AccountInterface')));
 }