コード例 #1
0
 /**
  * @return bool
  */
 public function match()
 {
     return password_verify($this->rawPassword, $this->user->getPassword());
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function getPassword()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPassword', array());
     return parent::getPassword();
 }
コード例 #3
0
 public function it_return_false_when_password_is_not_match(User $user)
 {
     $user->getPassword()->shouldBeCalled()->willReturn(password_hash('password', PASSWORD_DEFAULT));
     $this->beConstructedWith('invalid', $user);
     $this->match()->shouldReturn(false);
 }