I installed Intervention Image with
$ composer require intervention/image-laravel
And in my test, i tried :
Image::shouldReceive('read')->andReturnTrue();
i have this error :
Mockery\Exception: The class \Intervention\Image\ImageManager is marked final and its methods cannot be replaced. Classes marked final can be passed in to \Mockery::mock() as instantiated objects to create a partial mock, but only if the mock is not subject to type hinting checks.
Also tried :
$mock = Mockery::mock(Image::class);
$mock->shouldReceive('read');
PHP Fatal error: Cannot redeclare Mockery_3_Intervention_Image_Laravel_Facades_Image::shouldReceive() in /Users/xxx/Sites/xxx/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php(24) : eval()'d code on line 983
PHP Stack trace:
I have no idea how to do it ?