Uploading files is pretty important for my project, and although most companies avoid testing it like something with a really bad smell, I took a stab at it.
Unfortunately it is impossible right now to clear the CUploadedFile::$_files-property between test runs, forcing me to switch to process isolation for testing. This obviously increases the test time by a factor 10.
So the question is, as the topic states, is it possible to make CUploadedFile (and imho all components that have a private static that is only initialized once) more unit test friendly?
Page 1 of 1
CUploadedFile more testfriendly?
#2
Posted 07 April 2010 - 04:31 AM
Please create a ticket with your suggestions and possible solutions: http://code.google.c...ii/issues/list. It will help us to decide about it faster.
#3
Posted 17 January 2011 - 04:18 PM
I found this thread because I ran into the same problem. (Not many threads with the topic file upload testing)
So I was scratching my head how the hell to solve this, then I opened the CUploadedFile.php and looked into it.
There is a reset() method which can be called statically (from 1.1.4).
This is for the other searchers.
So I was scratching my head how the hell to solve this, then I opened the CUploadedFile.php and looked into it.
There is a reset() method which can be called statically (from 1.1.4).
This is for the other searchers.
-------------
m(o_O)m
m(o_O)m
Share this topic:
Page 1 of 1

Help












