Bolt\Tests\PasswordTest::testResetPasswordRequestNoMailOptions PHP Метод

testResetPasswordRequestNoMailOptions() публичный Метод

    public function testResetPasswordRequestNoMailOptions()
    {
        $app = $this->getApp();
        $this->addDefaultUser($app);
        $app['config']->set('general/mailoptions', null);
        $logger = $this->getMockFlashLogger();
        $logger->expects($this->atLeastOnce())->method('danger')->with($this->equalTo("The email configuration setting 'mailoptions' hasn't been set. Bolt may be unable to send password reset."));
        $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);
    }