class UserShortcutsTest extends TestCase
{
// ...
public function test_current_resource_property_contains_current_resource(): void
{
$user = $this->createAdminUser();
$this->actingAs($user)
->get(UserResource::getUrl())
->assertOk()
->assertSeeLivewire(UserShortcuts::class);
// How can I test my Livewire component or the value of 'currentResource' with the context of the current resource (UserResource) in mind?
Livewire::actingAs($user)
->test(UserShortcuts::class)
->assertSet('currentRessource', UserResource::class);
}
// ...
}
class UserShortcutsTest extends TestCase
{
// ...
public function test_current_resource_property_contains_current_resource(): void
{
$user = $this->createAdminUser();
$this->actingAs($user)
->get(UserResource::getUrl())
->assertOk()
->assertSeeLivewire(UserShortcuts::class);
// How can I test my Livewire component or the value of 'currentResource' with the context of the current resource (UserResource) in mind?
Livewire::actingAs($user)
->test(UserShortcuts::class)
->assertSet('currentRessource', UserResource::class);
}
// ...
}