Welcome Guest, Not a member yet? Register   Sign In
Poll: CI4: Easier way to create app tests?
You do not have permission to vote in this poll.
yes
75.86%
22 75.86%
no
13.79%
4 13.79%
maybe
10.34%
3 10.34%
Total 29 vote(s) 100%
* You voted for this item. [Show Results]

Application tests?
#7

I don't know how useful is to evaluate the HTML output within the buffer, determine for sure whether it is good or bad would be problematic. Logic to be tested is easier to be within models and libraries while the controller is the glue, as simple as possible. Anyway...

A fake (loaded before the normal) function redirect() for testing can be created. Inside this new function header(...) is omited or faked, ok. Then exit; statement stays as a problem.

If exit is simply replaced by return, then within the controller code execution will continue wrongly. Yet another return is needed for finishing contoller method execution immediately. This means that inside the fake function redirect(), at the end there should be code that removes the last position from the stack. I don't know how this manipulation can be done. For illustration here is a RFC that proposes how to return with skipping stack levels http://www.serverphorums.com/read.php?7,1163989 Somehow implemented, this effect might be the solution.
Reply


Messages In This Thread
Application tests? - by jlp - 04-06-2015, 05:54 PM
RE: Application tests? - by cjj - 04-06-2015, 11:04 PM
RE: Application tests? - by s4if - 04-07-2015, 06:16 PM
RE: Application tests? - by kenjis - 06-12-2015, 07:45 PM
RE: Application tests? - by ivantcholakov - 06-14-2015, 04:04 PM
RE: Application tests? - by kenjis - 06-14-2015, 05:55 PM
RE: Application tests? - by ivantcholakov - 06-14-2015, 09:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB