Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b560398b
Commit
b560398b
authored
Feb 24, 2014
by
MaximAL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding standards fixes.
parent
4f2873c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
LoginFormTest.php
apps/basic/tests/unit/models/LoginFormTest.php
+3
-3
No files found.
apps/basic/tests/unit/models/LoginFormTest.php
View file @
b560398b
...
...
@@ -24,7 +24,7 @@ class LoginFormTest extends TestCase
$model
->
username
=
'some_username'
;
$model
->
password
=
'some_password'
;
$this
->
specify
(
'user should not be able to login, when there is no identity'
,
function
()
use
(
$model
)
{
$this
->
specify
(
'user should not be able to login, when there is no identity'
,
function
()
use
(
$model
)
{
expect
(
'model should not login user'
,
$model
->
login
())
->
false
();
expect
(
'user should not be logged in'
,
Yii
::
$app
->
user
->
isGuest
)
->
true
();
});
...
...
@@ -51,7 +51,7 @@ class LoginFormTest extends TestCase
$model
->
username
=
'demo'
;
$model
->
password
=
'demo'
;
$this
->
specify
(
'user should be able to login with correct credentials'
,
function
()
use
(
$model
)
{
$this
->
specify
(
'user should be able to login with correct credentials'
,
function
()
use
(
$model
)
{
expect
(
'model should login user'
,
$model
->
login
())
->
true
();
expect
(
'error message should not be set'
,
$model
->
errors
)
->
hasntKey
(
'password'
);
expect
(
'user should be logged in'
,
Yii
::
$app
->
user
->
isGuest
)
->
false
();
...
...
@@ -60,7 +60,7 @@ class LoginFormTest extends TestCase
private
function
mockUser
(
$user
)
{
$loginForm
=
$this
->
getMock
(
'app\models\LoginForm'
,[
'getUser'
]);
$loginForm
=
$this
->
getMock
(
'app\models\LoginForm'
,
[
'getUser'
]);
$loginForm
->
expects
(
$this
->
any
())
->
method
(
'getUser'
)
->
will
(
$this
->
returnValue
(
$user
));
return
$loginForm
;
}
...
...
Write
Preview
Markdown
is supported
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