Unit Testing Library - Help :) |
[eluser]Unknown[/eluser]
Hello There, I am using https://github.com/Xeoncross/Testify.php and trying to create a unit testing system so that I can do calls to controller/model functions and "then do isEqual or what not on the results". However I am a bit confused as to how to make calls to controllers/models and include the default CI variables so they can be called exactly like they would in a normal CI instance. So I could do maybe Code: <?php Or something. Any pointers/help?
[eluser]aquary[/eluser]
CI has its own unit testing library, read the userguide. Though, I've never use any of unit testing, cannot comment any further.
[eluser]Dan Bowling[/eluser]
To work more directly with CI, you might try Jens Roland's TOAST (http://jensroland.com/projects/toast/) I've made some changes to my copy to support PHPUnit's syntax (https://bitbucket.org/dbowling/toaster) Testing controllers in CodeIgniter is hard, but you shouldn't have much logic in them anyways... testing models, libraries, and helpers is what's important. |
Welcome Guest, Not a member yet? Register Sign In |