CIUnit for CodeIgniter 2.x
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
application/third_party/CIUnit
tests
tools
.gitignore
README.md

README.md

What's this

CIUnit for CodeIgniter 2.x

Installation

Use install.sh

./tools/install.sh [CI2 Project Path]

Manual

Copy CIUnit Files

cp -R CIUnit-for-CI2/application [CI2 Project Path]/
cp -R CIUnit-for-CI2/tests [CI2 Project Path]/

Change Database Config

vi [CI2 Project Path]/application/config/database.php

$active_group = 'default';
+ if (defined('CIUnit_Version')) {
+     $active_group .= '_test';
+ }
$active_record = TRUE;

Run Tests

AllTests

cd [CI2 Project Path]/tests
phpunit

UnitTest

cd [CI2 Project Path]/tests
phpunit --no-configuration --bootstrap ../application/third_party/CIUnit/bootstrap_phpunit.php [Directory or PHP file path]

Eclipse Settings

CIUnit AllTests

CIUnit AllTests

CIUnit UnitTest

CIUnit UnitTest