A Decent Unit Test Template - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: A Decent Unit Test Template (/showthread.php?tid=54969) |
A Decent Unit Test Template - El Forum - 10-03-2012 [eluser]Kyle Johnson[/eluser] Here is a decent landscape oriented unit-test template that I've been using. I've split off the individual tests into various other functions for my own sanity. I'd love a better way to formulate the actual tests to have the name be equal to the test function, but that's not a big deal at this point. Specifying set_test_items requires a super simple fix (https://github.com/EllisLab/CodeIgniter/issues/395) This goes in my debug.php controller. http://localhost/index.php/debug/unit_tests Code: public function unit_tests() { I tried to attach a screenshot, but was unable to at this time. |