public function test_Retreive_Saved_File_Instead_Of_Creating_New() { Storage::disk('s3')->deleteDir('tests/vParameters'); Photo::find(1)->version(vParameters::class); $this->expectOutputString(''); Photo::find(1)->version(vParameters::class, 'Image Created!'); }
public function test_multiple_callback() { File::deleteDirectory(public_path('v200x200')); $this->expectOutputString('AB'); Photo::find(1)->beforeTransformation(function (Image $image) { echo "A"; })->beforeTransformation(function (Image $image) { echo "B"; })->version(v200x200::class); }