I'm working on a site with yii, which is very nice and everything is fine except the logging doesn't work when I run my test cases. I'm basically logging values inside my model classes which works when I run the application in the browser fine. My tests are supported by a bootstrapper and the models are run inside unit tests as usual.
The unit tests run fine, but they don't add anything to the logs. Is there anything I need to do to like activate the logger in the bootstrapper?
Here's my bootstrapper: -
<?php $yiit = '/usr/share/php/yii-framework/framework/yii.php'; $config= dirname(__FILE__) . '/../config/test.php'; require_once($yiit); Yii::createWebApplication($config);
Here's my test config snippet: -
'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'error, warning, info, trace', 'filter'=>'CLogFilter', 'categories' => 'system.*' ), ), ),
Here's how I'm logging my messages: -
Yii::log('example message', 'info', 'bobcom');
thanks for any help