• Information and Communications Technology

    Yii Console Log with Unit Testing

    1. install phpunit correctly pear install phpunit/PHPUnit pear install phpunit/PHPUnit_Selenium 2. create the class CConsoleLogRoute in the components directory in the file CConsoleLogRoute.php with this code: <?php class CConsoleLogRoute extends CLogRoute { protected function processLogs($logs) { foreach($logs as $log) { echo $this->formatLogMessage($log[0],$log[1],$log[2],$log[3]); } } } 3. configure YII to log…