createCountryWwl(); $response = $this->getJson('/api/countries-wwl'); $response->assertStatus(200) ->assertJsonFragment([ 'country_name' => $item->country_name, 'wwl' => $item->wwl, ]); } public function test_admin_can_create_country_wwl(): void { $this->actingAsAdmin(); $createResponse = $this->postJson('/api/countries-wwl', [ 'country_name' => 'Test Country', 'wwl' => 'AA00', ]); $createResponse->assertStatus(201); } public function test_non_admin_cannot_create_country_wwl(): void { $this->actingAsUser(); $this->postJson('/api/countries-wwl', [ 'country_name' => 'Test Country', 'wwl' => 'AA00', ])->assertStatus(403); } }