© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
giagara

Error while testing with phpunit starting from v3.2.77

With this simple test:

$file_name = 'document.pdf';
$file = UploadedFile::fake()->create($file_name, 100);

Livewire::test(CreateDocument::class)
            ->fillForm([
                'permissions' => $document->permissions,
                'name' => $file,
                'language' => $document->language,
            ])
            ->call('create')
$file_name = 'document.pdf';
$file = UploadedFile::fake()->create($file_name, 100);

Livewire::test(CreateDocument::class)
            ->fillForm([
                'permissions' => $document->permissions,
                'name' => $file,
                'language' => $document->language,
            ])
            ->call('create')


i get the error
ErrorException: Trying to access array offset on value of type null
ErrorException: Trying to access array offset on value of type null


This error starts happening since v3.2.77. With v3.2.76 the test executes correctly.

Other tests with same syntax are executing correctly
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

Testing resource CRUD using PHPUnit
FilamentFFilament / ❓┊help
2y ago
Error while upgrading from v2 to v3
FilamentFFilament / ❓┊help
3y ago
Upgrade Error From V2 to V3.2
FilamentFFilament / ❓┊help
2y ago
Error while upgrading v2 to v3!
FilamentFFilament / ❓┊help
3y ago