public function testResetPasswordNoMemberFound() { $data = array('email' => '*****@*****.**', 'security_key' => 'udKdSEiRgIF3T11q6S5o8MmW07NlAS6P', 'password' => 'password'); $passwordResetModel = $this->getMockMemberPasswordResetsMapper()->createModelFromData($data); $this->getMockMemberPasswordResetsMapper()->shouldReceive('fetchOneForEmailAndSecurityKey')->with($data['email'], $data['security_key'])->andReturn($passwordResetModel)->once(); $this->getMockMembersMapper()->shouldReceive('fetchOneForEmail')->with($data['email'])->andReturn(null)->once(); $this->setExpectedException('\\Exception', "Could not find member with email: {$data['email']}"); $this->forgotPasswordProcess->resetPassword($data['email'], $data['security_key'], $data['password']); }