RE: [PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Jared Williams
> -Original Message- > From: Piotr Czachur [mailto:[EMAIL PROTECTED] > Sent: 23 April 2008 12:36 > To: internals@lists.php.net > Subject: [PHP-DEV] Unable to unit test code containing > *_uploaded_file() > > Hello! > > I use PHPUnit for unit testi

Re: [PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Sebastian Bergmann
Pierre Joye schrieb: However, as far as I remember phpunit does not "fork" php and uses the current instance and that will not allow you to use the phpt method. If it is not the case, then it should be relatively easy to port the phpt system to phpunit (or use phpt :). PHPUnit_Extensions_PhptT

Re: [PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Pierre Joye
On Wed, Apr 23, 2008 at 1:35 PM, Piotr Czachur <[EMAIL PROTECTED]> wrote: > I use PHPUnit for unit testing of my application (but this issue is > independent of PHPUnit). Tests are run from command line so it's not > way (that I can imagine) to simulate file upload, because app code > uses is_

Re: [PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Alexey Zakhlestin
On Wed, Apr 23, 2008 at 3:35 PM, Piotr Czachur <[EMAIL PROTECTED]> wrote: > Hello! > > I use PHPUnit for unit testing of my application (but this issue is > independent of PHPUnit). Tests are run from command line so it's not > way (that I can imagine) to simulate file upload, because app code >

[PHP-DEV] Unable to unit test code containing *_uploaded_file()

2008-04-23 Thread Piotr Czachur
Hello! I use PHPUnit for unit testing of my application (but this issue is independent of PHPUnit). Tests are run from command line so it's not way (that I can imagine) to simulate file upload, because app code uses is_uploaded_file() to check if file was really uploaded. In my opionion some funct