pionl / laravel-chunk-upload

The basic implementation for chunk upload with multiple providers support like jQuery-file-upload, pupload, DropZone and resumable.js
MIT License
617 stars 167 forks source link

How i can write feature tests in laravel #134

Closed azamatgusov033 closed 2 years ago

azamatgusov033 commented 2 years ago

I must write controller video load feature test, but i don' t know how i can do this

pionl commented 2 years ago

Hey, what is your aim of the test? You want to check the PHP code (feature) or test also JS code with the PHP code (acceptance test)?

For acceptance test you can check https://github.com/pionl/laravel-chunk-upload-example which contains tests in codeceptjs for supported Laravel versions.

For feature test - you should be able to send a request with a file (or mock the request). Should not be hard to do so.

azamatgusov033 commented 2 years ago

I want to check the PHP code. I thought there are examples of tests. Thanks.

pionl commented 2 years ago

I've not made any tests. But you can update readme if you want 👍