Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Created July 16, 2011 13:30
Show Gist options
  • Save yuya-matsushima/1086360 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/1086360 to your computer and use it in GitHub Desktop.
TEST_Controller.php
<?php
/* Test Controller
------------------------------------------------------------------------*/
/**
* TEST_Controller
*
* @author yterajima <[email protected]>
* @copyright Copyright(C)e2esound.com/yterajima
* @version 1.0
*/
class TEST_Controller extends MY_Controller
{
/**
* __construct
*/
public function __construct()
{
parent::__construct();
$this->load->library('unit_test');
}
final public function index()
{
foreach(get_class_methods($this) as $m)
{
if( ! preg_match('/^_|get_instance|index/u', $m))
{
call_user_func(array($this, $m));
}
}
echo $this->unit->report();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment