samedi 7 octobre 2017

$file->hashName() returns null when faking upload in tests

For a test, I need to fake upload image, so I do:

$file = UploadedFile::fake()->image('avatar.jpg');

Then, I would like to get the hashName with:

 $hash = $file->hashName();

But it returns null... Any idea why is it happening???

Aucun commentaire:

Enregistrer un commentaire