Docker/SNIPE-IT/tests/Support/InteractsWithAuthentication.php
2024-04-17 20:22:30 +02:00

17 lines
281 B
PHP

<?php
namespace Tests\Support;
use Illuminate\Contracts\Auth\Authenticatable;
use Laravel\Passport\Passport;
trait InteractsWithAuthentication
{
protected function actingAsForApi(Authenticatable $user)
{
Passport::actingAs($user);
return $this;
}
}