public function testResetPasswordRequestSendSuccess()
{
$app = $this->getApp();
$this->addDefaultUser($app);
$app['config']->set('general/mailoptions', ['transport' => 'smtp', 'spool' => true, 'host' => 'localhost', 'port' => '25']);
$logger = $this->getMockFlashLogger();
$logger->expects($this->never())->method('error')->with($this->equalTo("A password reset link has been sent to 'sneakykoala'."));
$app['logger.flash'] = $logger;
$mailer = $this->getMockSwiftMailer();
$mailer->expects($this->atLeastOnce())->method('send')->will($this->returnValue(true));
$app['mailer'] = $mailer;
$event = new AccessControlEvent(Request::createFromGlobals());
$password = new Password($app);
$result = $password->resetPasswordRequest('admin', '8.8.8.8', $event);
$this->assertTrue($result);
}