Issues (36)

tests/Unit/AuthenticationTest.php (1 issue)

Severity
1
<?php
2
3
namespace Tests\Unit;
4
5
use App\Models\User;
6
use Illuminate\Foundation\Testing\RefreshDatabase;
7
use Tests\TestCase;
8
9
class AuthenticationTest extends TestCase
10
{
11
    use RefreshDatabase;
0 ignored issues
show
The trait Illuminate\Foundation\Testing\RefreshDatabase requires some properties which are not provided by Tests\Unit\AuthenticationTest: $seeder, $seed, $connectionsToTransact, $dropTypes, $dropViews
Loading history...
12
13
    /**
14
     * User Login Test.
15
     *
16
     * @return void
17
     */
18
    public function test_login()
19
    {
20
        $user = User::factory()->create([
21
            'email' => '[email protected]',
22
            'password' => bcrypt('123456'),
23
        ]);
24
25
        $logged = auth()->attempt(['email' => $user->email, 'password' => '123456']);
26
27
        $this->assertTrue($logged);
28
    }
29
}
30