Created
July 16, 2011 13:30
-
-
Save yuya-matsushima/1086360 to your computer and use it in GitHub Desktop.
TEST_Controller.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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