Summer Sale! All accounts are 50% off this week.

bernhardk's avatar

Fake On-Demand Disk (Storage::build())

Hello everybody,

would be great if anyone has an idea:

I am creating On-Demand Disk (https://laravel.com/docs/8.x/filesystem#on-demand-disks) with Storage::build([...]) in a "Processor". Now I want to test this "Processor" with a UnitTest. But calling Storage::fake() there does not have any effect. It still uses the real disk.

Does anybody have an idea how to fake the build method?

Thanks!

Best Regards, Bernhard

0 likes
0 replies

Please or to participate in this conversation.