Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with file to upload in test. #1

Open
mostafabarmshory opened this issue Oct 13, 2017 · 3 comments
Open

Issue with file to upload in test. #1

mostafabarmshory opened this issue Oct 13, 2017 · 3 comments

Comments

@mostafabarmshory
Copy link
Member

It is not possible to upload file in test. File is exist and I simple attached into the form.

@mostafabarmshory
Copy link
Member Author

There are several problem in file upload unit test. Here is a simple solution:

http://www.jamesfairhurst.co.uk/posts/view/testing_a_cakephp_contact_form_with_file_uploads

@mostafabarmshory
Copy link
Member Author

Functions such as is_uploaded_file, and move_uploaded_file are not compatible with unit test.

@mostafabarmshory
Copy link
Member Author

Here is an-other test approach:

http://blog.pixelastic.com/2010/08/04/testing-file-uploads-in-php/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant