Skip to content

Commit 71b309d

Browse files
committed
Only run auth tests for 5.1
1 parent 76858f3 commit 71b309d

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
99
processIsolation="false"
10-
stopOnFailure="false"
10+
stopOnFailure="true"
1111
syntaxCheck="false"
1212
verbose="true"
1313
>

src/Jenssegers/Mongodb/Auth/DatabaseTokenRepository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ protected function tokenExpired($token)
2828
// Convert UTCDateTime to a date string.
2929
if ($token['created_at'] instanceof UTCDateTime) {
3030
$date = $token['created_at']->toDateTime();
31-
3231
$token['created_at'] = $date->format('Y-m-d H:i:s');
3332
} elseif (is_array($token['created_at']) and isset($token['created_at']['date'])) {
3433
$token['created_at'] = $token['created_at']['date'];

tests/AuthTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use Illuminate\Auth\Passwords\PasswordBroker;
4+
use Illuminate\Foundation\Application;
45

56
class AuthTest extends TestCase
67
{
@@ -25,6 +26,10 @@ public function testAuthAttempt()
2526

2627
public function testRemind()
2728
{
29+
if (Application::VERSION >= '5.2') {
30+
return;
31+
}
32+
2833
$mailer = Mockery::mock('Illuminate\Mail\Mailer');
2934
$tokens = $this->app->make('auth.password.tokens');
3035
$users = $this->app['auth']->driver()->getProvider();

tests/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ protected function getEnvironmentSetUp($app)
3535
$app['config']->set('database.connections.mongodb', $config['connections']['mongodb']);
3636

3737
$app['config']->set('auth.model', 'User');
38+
$app['config']->set('auth.providers.users.model', 'User');
3839
$app['config']->set('cache.driver', 'array');
3940
}
4041
}

0 commit comments

Comments
 (0)