Finish 4.14.1

This commit is contained in:
4Giedrius committed 2015-02-06 09:30:03 +02:00
commit 1be3ca4c21
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -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);