Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 27, 2018
1 parent 94a25c2 commit 30ec4ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions http-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,14 @@ The `Illuminate\Http\UploadedFile` class provides a `fake` method which may be u
{
Storage::fake('avatars');

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

$response = $this->json('POST', '/avatar', [
'avatar' => UploadedFile::fake()->image('avatar.jpg')
'avatar' => $file,
]);

// Assert the file was stored...
Storage::disk('avatars')->assertExists('avatar.jpg');
Storage::disk('avatars')->assertExists($file->hashName());

// Assert a file does not exist...
Storage::disk('avatars')->assertMissing('missing.jpg');
Expand Down

0 comments on commit 30ec4ec

Please sign in to comment.