Unverified Commit cf420162 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #94 from viralsolani/analysis-8LDQ4w

Apply fixes from StyleCI
parents 01dbc4f5 8817c374
......@@ -20,11 +20,11 @@ $factory->define(User::class, function (Generator $faker) {
return [
'first_name' => $faker->name,
'last_name' => $faker->name,
'last_name' => $faker->name,
'email' => $faker->safeEmail,
'password' => $password ?: $password = bcrypt('secret'),
'confirmation_code' => md5(uniqid(mt_rand(), true)),
'remember_token' => str_random(10)
'remember_token' => str_random(10),
];
});
......@@ -52,7 +52,6 @@ $factory->state(User::class, 'unconfirmed', function () {
];
});
/*
* Roles
*/
......
......@@ -43,7 +43,7 @@ abstract class BrowserKitTestCase extends BaseTestCase
*/
protected $userRole;
/**
/**
* Set up tests.
*/
public function setUp()
......
......@@ -2,10 +2,10 @@
namespace Tests\Feature;
use App\Events\Frontend\Auth\UserLoggedIn;
use Illuminate\Support\Facades\Auth;
use Tests\BrowserKitTestCase;
use Illuminate\Support\Facades\Event;
use App\Events\Frontend\Auth\UserLoggedIn;
use Tests\BrowserKitTestCase;
class AuthTest extends BrowserKitTestCase
{
......@@ -44,22 +44,22 @@ class AuthTest extends BrowserKitTestCase
public function users_can_login()
{
// Make sure our events are fired
Event::fake();
Event::fake();
Auth::logout();
Auth::logout();
//User Test
$this->visit('/login')
//User Test
$this->visit('/login')
->type($this->user->email, 'email')
->type('1234', 'password')
->press('Login')
->see($this->user->name)
->seePageIs('/dashboard');
Auth::logout();
Auth::logout();
//Admin Test
$this->visit('/login')
//Admin Test
$this->visit('/login')
->type($this->admin->email, 'email')
->type('1234', 'password')
->press('Login')
......@@ -67,6 +67,6 @@ class AuthTest extends BrowserKitTestCase
->see($this->admin->first_name)
->see('Access Management');
Event::assertDispatched(UserLoggedIn::class);
Event::assertDispatched(UserLoggedIn::class);
}
}
......@@ -4,8 +4,8 @@ namespace Tests;
use App\Models\Access\Role\Role;
use App\Models\Access\User\User;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Artisan;
abstract class TestCase extends BaseTestCase
{
......@@ -41,7 +41,7 @@ abstract class TestCase extends BaseTestCase
*/
protected $userRole;
/**
/**
* Set up tests.
*/
public function setUp()
......
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