CodeIgniter Forums
How to do unit testing on functions from another controller? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to do unit testing on functions from another controller? (/thread-48187.html)



How to do unit testing on functions from another controller? - El Forum - 01-07-2012

[eluser]Unknown[/eluser]
Hi, i would like to know how can i test my function in my controller?

my unit testing is one of the controller name test.php.
eg. http://localhost/demo/test

How can i test functions in 'customer' controller.
eg. i want to do a unit test for this function http://localhost/demo/customer/make_order

it is calling a controller from another controller which go against the MVC architecture?

but for unit testing purpose, any suggestion ways to test my functions in another controller?

thank you..