PHPUnit/CIUnit and Unit Testing Class integration |
[eluser]kenjis[/eluser]
Hi, there. I integrate CIUnit and CI's Unit Testing Class. You can execute tests of Unit Testing Class via PHPUnit. Code: https://bitbucket.org/kenjis/my-ciunit Execute Tests of CodeIgniter Unit Testing Class: Limitation: You must execute all tests in index() function of testing controllers. Example: Code: function index() See tests/controllers/CI_Unit_Test_class_Test.php. In test_CI_Unit_Test_Class() function, set the folder where testing controllers are in. Code: $test_path = APPPATH . 'controllers'; It runs all *.php files in "application/controllers/tests" folder. PHPUnit shows all test file names and failed test names. If more than one test fails, PHPUnit reports 1 failure, even if 100 fails occurres. |
Welcome Guest, Not a member yet? Register Sign In |