I\'m using simpleTest to write my PHP tests. I\'m writing a file upload plugin and was wondering how I may be testing it.
I would like to check that the file is corr
You can generate a file upload in a programmatic manner with e.g. the curl extension.
Since this requires PHP running under a web server, it's not much of a unit test. Consequently, the best way would be to to use PHPT tests and fill the --POST_RAW-- section with the data.
If you don't know what to put in the --POST_RAW--, try to install the TamperData Firefox extension, do a file submission from Firefox, and copy-paste the data from the right side.