finishes 13 and 14
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
//
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* Create and authenticate a user for testing.
|
||||
*/
|
||||
protected function createAuthenticatedUser(array $attributes = []): User
|
||||
{
|
||||
$user = User::factory()->create($attributes);
|
||||
$this->actingAs($user);
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user