mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-25 14:23:00 +09:00
Finish 4.14.1
This commit is contained in:
commit
1be3ca4c21
2 files changed
+6
-1
No files matched your search
@@ -248,7 +248,7 @@ class Guest extends \Api_Abstract
|
||||
$new_pass = substr(md5(time() . uniqid()), 0, 10);
|
||||
|
||||
$c = $this->di['db']->load('Client', $reset->client_id);
|
||||
$c->pass = $new_pass;
|
||||
$c->pass = $this->di['password']->hashIt($new_pass);
|
||||
$this->di['db']->store($c);
|
||||
|
||||
//send email
|
||||
|
||||
@@ -329,10 +329,15 @@ class GuestTest extends \PHPUnit_Framework_TestCase {
|
||||
$emailServiceMock->expects($this->atLeastOnce())->
|
||||
method('sendTemplate');
|
||||
|
||||
$passwordMock = $this->getMockBuilder('\Box_Password')->getMock();
|
||||
$passwordMock->expects($this->atLeastOnce())
|
||||
->method('hashIt');
|
||||
|
||||
$di = new \Box_Di();
|
||||
$di['db'] = $dbMock;
|
||||
$di['logger'] = new \Box_Log();
|
||||
$di['mod_service'] = $di->protect(function ($name) use($emailServiceMock) {return $emailServiceMock;});
|
||||
$di['password'] = $passwordMock;
|
||||
|
||||
$client = new \Box\Mod\Client\Api\Guest();
|
||||
$client->setDi($di);
|
||||
|
||||
Reference in new issue
Block a user