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 This error starts happening since v3.2.77. With v3.2.76 the test executes correctly. Other tests with same syntax are executing correctly
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server