Enabled phpunit, updates for ab_setup, enabled APC, and other todos

This commit is contained in:
Deon George
2012-08-23 20:14:46 +10:00
parent 878c159e3a
commit 23247a5d4e
8 changed files with 53 additions and 27 deletions

View File

@@ -22,7 +22,10 @@ abstract class lnApp_Config extends Kohana_Config {
* NOTE: Kohana doesnt provide a parent construct for the Kohana_Config class.
*/
public function __construct() {
if (Kohana::$is_cli) {
if (defined('PHPUNITTEST'))
$_SERVER['SERVER_NAME'] = PHPUNITTEST;
elseif (Kohana::$is_cli) {
if (! $site = CLI::options('site'))
throw new Kohana_Exception(_('Cant figure out the site, use --site= for CLI'));
else
@@ -116,7 +119,7 @@ abstract class lnApp_Config extends Kohana_Config {
* Show a date using a site configured format
*/
public static function datetime($date) {
return date(Kohana::config('config.date_format').' '.Kohana::config('config.time_format'),$date);
return sprintf('%s %s',static::date($date),static::time($date));
}
/**