Saturday, October 1, 2011

unit tests Cakephp 2.0 using Router::parse

I am trying to built a test for a helper method which uses Router:parse()

The method works fine in the app but when I debug(Router::parse($url) in the test case it always returns an empty array.

How do I initialize the Router class in a test helper case and which properties would I need to set.

I am very new to testing and have found the learning curve steep.  My knowledge of oop is also basic at best.  Please help.

Thanks.


--
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: