<?php namespace Tests\Feature; use Tests\TestCase; use Illuminate\Foundation\Testing\RefreshDatabase; use App\Models\{User,PayrollItem}; use App\Services\PayrollService; class PayslipAuthorizationTest extends TestCase{use RefreshDatabase;public function test_employee_cannot_download_another_employee_payslip():void{$this->seed();app(PayrollService::class)->calculate(now()->format('Y-m'));$item=PayrollItem::first();$intern=User::where('email','intern@softsuite.local')->first();$this->actingAs($intern)->get(route('payslips.show',$item))->assertForbidden();}}