Reputation: 457
We have two CodeIgniter instances in production which I've just finished migrating to CodeIgniter 3. A large gap has been left in our code base since it was not designed with testability in mind. As the applications have evolved over 4 years throwing a test harness around it is not so simple.
There is code in controllers that just render views and code in views that just post to controllers and getting between the two is maddening.
I've tried to use PHPUnit to achieve testing as well as the CodeIgniter Unit Test class, but I always wind up back at this conundrum. Is there any advice people in similar situations can offer?
Upvotes: 0
Views: 626
Reputation: 15902
Well, it's quite hard to achieve testing in a legacy application in Codeigniter... What I ended up doing is:
I would also like hearing from others experience. I personally use Codeception all the time even for Unit test (at the end, is built over PHPUnit). Main page: http://codeception.com/
Upvotes: 2