TOAST and CI 3 |
Hi,
I am trying to use TOAST to perform Unit Testing with a lightweight library. I have managed to get it to work, but I still have a couple of questions (which more CI related than pure TOAST). Here is an example of a class (don't look at the test ... it's just for testing ;-) TOAST): PHP Code: <?php First of all in autoload.php I have this line: PHP Code: $autoload['libraries'] = array('database' ,'firePHP', 'ion_auth'); Quote:Severity: ErrorAny idea on how to fix this ? One thing that I don't understand, is that I have to instantiate the controler (with variable $theControler) and to load the model ! I understand that I need to load the model, but then, why I can not write : PHP Code: $this->Reservation_model->getAllResType() Quote:Severity: Notice) And last but not least, the Toast_all method generates an error 403 You don't have permission to access /test/Calendrier_test/show_results . Permissions were set to 777 for all directories and files and I still get the error. The Toast_all is using curl. I have asked the maintainer but I am asking here too ... just in case. Thanks in advance for any reply (even for only one of the points), L@u
I've fixed the Toast_all URL problem (related to the way CURL was called).
The two others problem are related to the way controler/model are tested and the tested class being instantiated in the constructor. I am hoping to get a good example of doing this, but if someone has an example of testing classes, it will be great. |
Welcome Guest, Not a member yet? Register Sign In |