Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
151a29ba
Commit
151a29ba
authored
Jan 24, 2017
by
Peter Prochaska
Browse files
fixed unittests
parent
d2f47acb
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/Core/Controller/LostControllerTest.php
View file @
151a29ba
...
...
@@ -26,6 +26,7 @@ use OCP\AppFramework\Http\TemplateResponse;
use
OCP\AppFramework\Utility\ITimeFactory
;
use
OCP\IConfig
;
use
OCP\IL10N
;
use
OCP\ILogger
;
use
OCP\IRequest
;
use
OCP\IURLGenerator
;
use
OCP\IUser
;
...
...
@@ -63,6 +64,8 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase {
private
$timeFactory
;
/** @var IRequest */
private
$request
;
/** @var ILogger */
private
$logger
;
protected
function
setUp
()
{
...
...
@@ -98,6 +101,8 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase {
->
disableOriginalConstructor
()
->
getMock
();
$this
->
request
=
$this
->
getMockBuilder
(
'OCP\IRequest'
)
->
disableOriginalConstructor
()
->
getMock
();
$this
->
logger
=
$this
->
getMockBuilder
(
'OCP\ILogger'
)
->
disableOriginalConstructor
()
->
getMock
();
$this
->
lostController
=
new
LostController
(
'Core'
,
$this
->
request
,
...
...
@@ -110,7 +115,8 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase {
'lostpassword-noreply@localhost'
,
true
,
$this
->
mailer
,
$this
->
timeFactory
$this
->
timeFactory
,
$this
->
logger
);
}
...
...
@@ -250,7 +256,7 @@ class LostControllerTest extends \PHPUnit_Framework_TestCase {
$response
=
$this
->
lostController
->
email
(
$nonExistingUser
);
$expectedResponse
=
[
'status'
=>
'error'
,
'msg'
=>
'Couldn\'t send reset email
. Please make sure your username is correc
t.'
'msg'
=>
'Couldn\'t send reset email
because User does not exis
t.'
];
$this
->
assertSame
(
$expectedResponse
,
$response
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment