© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
Mavv

ComponentNotFoundException: Unable to find component (PHPUnit)

I wanted to start writing tests for filling out my forms using PHPUnit (no Pest). But I keep running into the same issue.

See here my testing code:
use App\Filament\Resources\MusicianResource;
use Livewire\Livewire;

    public function testFillForm()
    {
        Livewire::test(MusicianResource::class)
            ->fill([...]);
    }
use App\Filament\Resources\MusicianResource;
use Livewire\Livewire;

    public function testFillForm()
    {
        Livewire::test(MusicianResource::class)
            ->fill([...]);
    }


I always get this error message:
Livewire\Exceptions\ComponentNotFoundException: Unable to find component: [App\Filament\Resources\MusicianResource]
Livewire\Exceptions\ComponentNotFoundException: Unable to find component: [App\Filament\Resources\MusicianResource]


I tried looking up the filament testing page and the Livewire testing page.
Solution
Thanks. The issue then is, that I was trying to test the whole resource, but one must always test the individual pages 👍
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

Livewire\Exceptions\ComponentNotFoundException: Unable to find component: [filament.pages.auth.regis
FilamentFFilament / ❓┊help
17mo ago
Unable to find component
FilamentFFilament / ❓┊help
2y ago
Unable to find component
FilamentFFilament / ❓┊help
2y ago
Unable to find component : [notifications]
FilamentFFilament / ❓┊help
2y ago