Where test data is set up: https://github.com/davidpersson/media/blob/next/tests/cases/models/behaviors/base.test.php
TransferBehavior: https://github.com/davidpersson/media/blob/next/tests/cases/models/behaviors/transfer.test.php
There are even more tests and data in the MM library within the plugin: https://github.com/davidpersson/media/tree/next/libs/mm/tests
I don't have any experience with MeioUpload but I imagine changing the paths to the tmp folder will be possible.
I know this isn't a specific answer but it should give you some good jumping off points.
-jeremy
On Thursday, April 26, 2012 7:57:40 AM UTC-7, Thiago Belem wrote:
I'm creating a new MeioUpload/Media behavior and I wanted to make it totally covered by tests...
Do you guys have any idea/recomendation/resource about mocking uploads on CakePHP + PHPUnit?
I know I can't just populate $_FILES with my data and expect is_uploaded_file or move_uploaded_file functions to work.I don't want to use anoter testing framework like PHPT or something that's not pure CakePHP and PHPUnit.Regards,--
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - BrasilAssando Sites - Curso online de CakePHPassando-sites.com.br
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment