Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
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
sinan
laravel-mongodb
Commits
71b309df
Commit
71b309df
authored
Jan 25, 2016
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only run auth tests for 5.1
parent
76858f3c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
phpunit.xml
phpunit.xml
+1
-1
DatabaseTokenRepository.php
src/Jenssegers/Mongodb/Auth/DatabaseTokenRepository.php
+0
-1
AuthTest.php
tests/AuthTest.php
+5
-0
TestCase.php
tests/TestCase.php
+1
-0
No files found.
phpunit.xml
View file @
71b309df
...
...
@@ -7,7 +7,7 @@
convertNoticesToExceptions=
"true"
convertWarningsToExceptions=
"true"
processIsolation=
"false"
stopOnFailure=
"
fals
e"
stopOnFailure=
"
tru
e"
syntaxCheck=
"false"
verbose=
"true"
>
...
...
src/Jenssegers/Mongodb/Auth/DatabaseTokenRepository.php
View file @
71b309df
...
...
@@ -28,7 +28,6 @@ class DatabaseTokenRepository extends \Illuminate\Auth\Passwords\DatabaseTokenRe
// Convert UTCDateTime to a date string.
if
(
$token
[
'created_at'
]
instanceof
UTCDateTime
)
{
$date
=
$token
[
'created_at'
]
->
toDateTime
();
$token
[
'created_at'
]
=
$date
->
format
(
'Y-m-d H:i:s'
);
}
elseif
(
is_array
(
$token
[
'created_at'
])
and
isset
(
$token
[
'created_at'
][
'date'
]))
{
$token
[
'created_at'
]
=
$token
[
'created_at'
][
'date'
];
...
...
tests/AuthTest.php
View file @
71b309df
<?php
use
Illuminate\Auth\Passwords\PasswordBroker
;
use
Illuminate\Foundation\Application
;
class
AuthTest
extends
TestCase
{
...
...
@@ -25,6 +26,10 @@ class AuthTest extends TestCase
public
function
testRemind
()
{
if
(
Application
::
VERSION
>=
'5.2'
)
{
return
;
}
$mailer
=
Mockery
::
mock
(
'Illuminate\Mail\Mailer'
);
$tokens
=
$this
->
app
->
make
(
'auth.password.tokens'
);
$users
=
$this
->
app
[
'auth'
]
->
driver
()
->
getProvider
();
...
...
tests/TestCase.php
View file @
71b309df
...
...
@@ -35,6 +35,7 @@ class TestCase extends Orchestra\Testbench\TestCase
$app
[
'config'
]
->
set
(
'database.connections.mongodb'
,
$config
[
'connections'
][
'mongodb'
]);
$app
[
'config'
]
->
set
(
'auth.model'
,
'User'
);
$app
[
'config'
]
->
set
(
'auth.providers.users.model'
,
'User'
);
$app
[
'config'
]
->
set
(
'cache.driver'
,
'array'
);
}
}
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