| 1 | <?php |
||
| 24 | final class DummyUserPasswordEncoder implements UserPasswordEncoder |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * The expected response. |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $expectedResponse; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Is password valid boolean. |
||
| 35 | * |
||
| 36 | * @var bool |
||
| 37 | */ |
||
| 38 | private $isPasswordValid; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Constructor. |
||
| 42 | * |
||
| 43 | * @param string $expectedResponse The expected response |
||
| 44 | * @param bool $isPasswordValid Is password valid boolean, by default is true |
||
| 45 | */ |
||
| 46 | public function __construct($expectedResponse, $isPasswordValid = true) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | public function encode($aPlainPassword, $aSalt) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | public function isPasswordValid(UserPassword $anEncoded, $aPlainPassword) |
||
| 67 | } |
||
| 68 |