1: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2:
3: class Test extends CI_Controller {
4: /**
5: * Class Constructor
6: */
7: public function __construct() {
8: parent::__construct();
9: $this->load->driver('Unit_tests');
10: }
11:
12: /**
13: * Run all available unit tests.
14: */
15: public function index() {
16: $this->load->view('general/test');
17: $this->unit_tests->run_all_tests();
18: }
19:
20: /**
21: * Test only the app models.
22: */
23: public function models() {
24: $this->load->view('general/test');
25: $this->unit_tests->run_model_tests();
26: }
27:
28: /**
29: * Test only the app libraries.
30: */
31: public function libraries() {
32: $this->load->view('general/test');
33: $this->unit_tests->run_library_tests();
34: }
35: }
36:
37: /* End of file test.php */
38: /* Location: ./application/controllers/test.php */