laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

Method "fake" of facade Storage is throwing an error: undefined method storagePath #794

Closed gui-com-pt closed 6 years ago

gui-com-pt commented 6 years ago

Description:

I'm testing a endpoint that uploads a file and i'm using the fake method for Storage but it's getting a error.

Steps To Reproduce:

At the begin of the test, i invoke:

Storage::fake('uploaded');

And it returns the following error:

Error: Call to undefined method Illuminate\Container\Container::storagePath()

This is where the trace gets me:

vendor/laravel/lumen-framework/src/helpers.php:307
vendor/illuminate/support/Facades/Storage.php:26
jensdenies commented 6 years ago

Everything is working fine for me. the storagePath method is defined in Lumen's Application.php, which extends the Container. Are your dependencies up to date?

driesvints commented 6 years ago

Heya, this is working for me as well. Let us know if this problem persists.