PHPackages                             celc/ciunit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. celc/ciunit

AbandonedArchivedLibrary

celc/ciunit
===========

Enables testing CodeIgniter 2.1 with PHPUnit

1.0.0(10y ago)4935.9k—7.1%32[11 issues](https://github.com/kitsunde/CIUnit/issues)MITPHP

Since Jun 25Pushed 10y ago6 watchersCompare

[ Source](https://github.com/kitsunde/CIUnit)[ Packagist](https://packagist.org/packages/celc/ciunit)[ RSS](/packages/celc-ciunit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

CIUnit for CodeIgniter 2
========================

[](#ciunit-for-codeigniter-2)

**Note:** This is not compatible with CodeIgniter 3. The original creator of my-ciunit has a new project for that here: .

Examples
--------

[](#examples)

### Controller

[](#controller)

```
class LoginActionTest extends CIUnit_TestCase
{
    public function setUp()
    {
        $this->CI = set_controller('login');
    }

    public function testLogin()
    {
        $_POST['useremail'] = 'kitsunde@example.org';
        $_POST['password'] = '123';
        $this->CI->login_action();
        $out = output();
        $this->assertRedirects($GLOBALS['OUT'], 'employee/index');
    }

    public function testTemplateRendered()
    {
        $this->CI->login_action();
        $views = output_views();
        $this->assertContains('login', $views);
    }
}
```

Install via composer
--------------------

[](#install-via-composer)

```
composer require Celc/ciunit dev-master
```

Copy the example test directory into the root of your project (same folder as `application` and `system`):

```
cp -R vendor/celc/ciunit/tests ./
```

Create `application/config/testing/database.php` for database testing. The database name must end with `_test`.

Writing tests
-------------

[](#writing-tests)

The `tests` directory is an example. You are meant to replace the tests with your own.

Run Tests:
----------

[](#run-tests)

From the `tests` directory run:

```
../vendor/phpunit
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3981d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/696abf987cfe68d3f4b29f9408869b1a873441bb3df80a6ba256cf4b1657a553?d=identicon)[kitsunde](/maintainers/kitsunde)

---

Top Contributors

[![ogyr](https://avatars.githubusercontent.com/u/1782?v=4)](https://github.com/ogyr "ogyr (47 commits)")[![kitsunde](https://avatars.githubusercontent.com/u/48965?v=4)](https://github.com/kitsunde "kitsunde (38 commits)")[![erj1](https://avatars.githubusercontent.com/u/428919?v=4)](https://github.com/erj1 "erj1 (8 commits)")[![timnolte](https://avatars.githubusercontent.com/u/4312062?v=4)](https://github.com/timnolte "timnolte (2 commits)")[![flitert](https://avatars.githubusercontent.com/u/3271510?v=4)](https://github.com/flitert "flitert (2 commits)")[![thominj](https://avatars.githubusercontent.com/u/3819908?v=4)](https://github.com/thominj "thominj (1 commits)")[![abfan1127](https://avatars.githubusercontent.com/u/242785?v=4)](https://github.com/abfan1127 "abfan1127 (1 commits)")[![Xavierus](https://avatars.githubusercontent.com/u/11961451?v=4)](https://github.com/Xavierus "Xavierus (1 commits)")[![austintech](https://avatars.githubusercontent.com/u/41275?v=4)](https://github.com/austintech "austintech (1 commits)")[![Korri](https://avatars.githubusercontent.com/u/130747?v=4)](https://github.com/Korri "Korri (1 commits)")[![misaelnieto](https://avatars.githubusercontent.com/u/146899?v=4)](https://github.com/misaelnieto "misaelnieto (1 commits)")[![seregazhuk](https://avatars.githubusercontent.com/u/9959761?v=4)](https://github.com/seregazhuk "seregazhuk (1 commits)")

### Embed Badge

![Health badge](/badges/celc-ciunit/health.svg)

```
[![Health](https://phpackages.com/badges/celc-ciunit/health.svg)](https://phpackages.com/packages/celc-ciunit)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.4k37.3k](/packages/matomo-matomo)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M775](/packages/typo3-testing-framework)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

31252.7k5](/packages/webmozarts-strict-phpunit)[mediawiki/translate

The only standard solution to translate any kind of text with an avant-garde web interface within MediaWiki, including your documentation and software

457.9k](/packages/mediawiki-translate)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
