Commit 71b309df authored by Jens Segers's avatar Jens Segers

Only run auth tests for 5.1

parent 76858f3c
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="true"
syntaxCheck="false" syntaxCheck="false"
verbose="true" verbose="true"
> >
......
...@@ -28,7 +28,6 @@ class DatabaseTokenRepository extends \Illuminate\Auth\Passwords\DatabaseTokenRe ...@@ -28,7 +28,6 @@ class DatabaseTokenRepository extends \Illuminate\Auth\Passwords\DatabaseTokenRe
// Convert UTCDateTime to a date string. // Convert UTCDateTime to a date string.
if ($token['created_at'] instanceof UTCDateTime) { if ($token['created_at'] instanceof UTCDateTime) {
$date = $token['created_at']->toDateTime(); $date = $token['created_at']->toDateTime();
$token['created_at'] = $date->format('Y-m-d H:i:s'); $token['created_at'] = $date->format('Y-m-d H:i:s');
} elseif (is_array($token['created_at']) and isset($token['created_at']['date'])) { } elseif (is_array($token['created_at']) and isset($token['created_at']['date'])) {
$token['created_at'] = $token['created_at']['date']; $token['created_at'] = $token['created_at']['date'];
......
<?php <?php
use Illuminate\Auth\Passwords\PasswordBroker; use Illuminate\Auth\Passwords\PasswordBroker;
use Illuminate\Foundation\Application;
class AuthTest extends TestCase class AuthTest extends TestCase
{ {
...@@ -25,6 +26,10 @@ class AuthTest extends TestCase ...@@ -25,6 +26,10 @@ class AuthTest extends TestCase
public function testRemind() public function testRemind()
{ {
if (Application::VERSION >= '5.2') {
return;
}
$mailer = Mockery::mock('Illuminate\Mail\Mailer'); $mailer = Mockery::mock('Illuminate\Mail\Mailer');
$tokens = $this->app->make('auth.password.tokens'); $tokens = $this->app->make('auth.password.tokens');
$users = $this->app['auth']->driver()->getProvider(); $users = $this->app['auth']->driver()->getProvider();
......
...@@ -35,6 +35,7 @@ class TestCase extends Orchestra\Testbench\TestCase ...@@ -35,6 +35,7 @@ class TestCase extends Orchestra\Testbench\TestCase
$app['config']->set('database.connections.mongodb', $config['connections']['mongodb']); $app['config']->set('database.connections.mongodb', $config['connections']['mongodb']);
$app['config']->set('auth.model', 'User'); $app['config']->set('auth.model', 'User');
$app['config']->set('auth.providers.users.model', 'User');
$app['config']->set('cache.driver', 'array'); $app['config']->set('cache.driver', 'array');
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment