/** * @return bool */ public function match() { return password_verify($this->rawPassword, $this->user->getPassword()); }
/** * {@inheritDoc} */ public function getPassword() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPassword', array()); return parent::getPassword(); }
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); }