Codeigniter 2.1.0 & PHPUnit

Hi, in order to use PhpUnit with Codeigniter 2.1.0, i’m using Kenjis solution at

1 . Install PHPUnit with wget in Ubuntu (use version 4.8  wget

2. Then follow Kenjis instruction to download & setup my-ciunit

3. After finish step 2, edit file application/third_party/CIUnit/bootstrap_phpunit.php
Disable line 259: //require_once (‘PHPUnit/Autoload.php’);

Then you should be able to run the test by following Kenjis examples or

$ cd myProjectDir/tests

//to test all
$ phpunit

//to test specific folder, eg: models
$ phpunit models

//to test specific model
$ phpunit models/myModel.php



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s