fmalk/codeigniter-phpunit — pull request #6 by feryardiant (2014-05-13 20:12:51+00:00)
Title: Fixing issue with my own Core Controller class and CI Uri Helper

Hi @fmalk! first of all, I have no issues with fresh install of Codeinniter, but when I use it on my existing project, I found `phpunit` have no output at all. So, I need to dive into it.

In my case I'm using have an authentication method that called on my core controller, let say:

```php
class MY_Controller extends CI_Controller
{
function __construct()
{
parent::__construct();

if (!$this->users->is_logged_in())
{
redirect('login');
}
}
}
```

That causing I can see any output from `phpunit`, you can see [here](https://travis-ci.org/feryardiant/codeigniter-phpunit/builds/25091919#L69). So I'd try to override [`redirect()`](https://github.com/feryardiant/codeigniter-phpunit/blob/448768a0bf679fe6018be8df6e23984146f9fa5d/application/tests/bootstrap.php#L46) and [here](https://travis-ci.org/feryardiant/codeigniter-phpunit/builds/25093192#L69) the results.

But, it's not done yet. I got another error:

```
PHP Fatal error: Class 'PHPUnit_Extensions_Database_TestCase' not found in \application\tests\CITest.php on line 16
```

So I install the dependencies using composer, and [require](https://github.com/feryardiant/codeigniter-phpunit/blob/448768a0bf679fe6018be8df6e23984146f9fa5d/application/tests/bootstrap.php#L58) composer's autoloader file.

Then everythings works fine.