© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
paulohenriquesg

Test relation manager

I'm trying to test the relation managers, like the following:

        $thing = Thing::factory()->create();

        Livewire::test(OtherThingRelationManager::class, ['ownerRecord' => $thing])
            ->assertSuccessful();
        $thing = Thing::factory()->create();

        Livewire::test(OtherThingRelationManager::class, ['ownerRecord' => $thing])
            ->assertSuccessful();


And I'm getting the following error:
Filament\Resources\RelationManagers\RelationManager::getPageClass(): Return value must be of type string, null returned
Filament\Resources\RelationManagers\RelationManager::getPageClass(): Return value must be of type string, null returned


This happens on
vendor/filament/filament/src/Resources/RelationManagers/RelationManager.php:163
vendor/filament/filament/src/Resources/RelationManagers/RelationManager.php:163


Do you have any ideas? Or more info/examples on how to test Relationship Managers?

Thank you!
Solution
Not sure, have you tried something like this?
Livewire::test(OtherThingRelationManager::class, [
    'pageClass' => EditPage::class,
    'ownerRecord' => $thing,
])
Livewire::test(OtherThingRelationManager::class, [
    'pageClass' => EditPage::class,
    'ownerRecord' => $thing,
])
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Relation Manager
FilamentFFilament / ❓┊help
2y ago
Relation Manager
FilamentFFilament / ❓┊help
3y ago
Relation Manager
FilamentFFilament / ❓┊help
3y ago
Relation Manager through relation
FilamentFFilament / ❓┊help
2y ago