Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Unit Testing class - best practices/security
#3

(02-08-2017, 03:24 PM)albertleao Wrote: Yes, I wouldn't recommend doing it the way you do it.

There is a great testing system built by a guy you will run into often on this forum for php unit. You can see it here:

https://github.com/kenjis/ci-phpunit-test

Big Grin  Thanks! Will look into this ASAP. From now on it's PHPUnit with CI 

I'm still wondering how I would go about using CI unit testing library. If I have my tests in a public method in same controller it's testing and that is definitely wrong, how would I go about putting it in a safer spot.

To make request to public method "unit_test()" more secure, I could display nothing to browser and no response for request... just send an emaiil if something is wrong or write to a log file... how would you approach such a dilemma?

The documentation for unit testing did not mention a best practice for this.
https://www.codeigniter.com/user_guide/l...sting.html

Thanks again.
Reply


Messages In This Thread
RE: CodeIgniter Unit Testing class - best practices/security - by CI_robots - 02-08-2017, 06:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB