public function setUp() { Config::initialize(); Config::request('foo')->doesCommand('test')->whichInvokes('ExceptionThrowingCommand'); Config::request('div')->doesCommand('test')->whichInvokes('ErrorThrowingCommand'); Config::logger('fail')->whichInvokes('FortissimoArrayInjectionLogger'); }
* ->withParam('categories') * ->whoseValueIs('Fatal Error,Recoverable Error') * ; * @endcode * * New loggers can be created very easily. See the FortissimoOutputInjectionLogger code for an * example. * * Loggers that ship with Fortissimo: * - FortissimoOutputInjectionLogger (aka FOIL) * - FortissimoArrayInjectionLogger (aka FAIL) * - SimpleOutputInjectionLogger (aka SOIL) * - SimpleArrayInjectionLogger (aka SAIL) * - FortissimoSyslogLogger (aka... Fizzle?) */ Config::logger('foil')->whichInvokes('FortissimoOutputInjectionLogger'); /** * @page cache_config Caches * * Caching support is built into Fortissimo. * * Fortissimo has built-in support for multiple caching backends. For example, applications could * strategically cache some data in memcache and some in APC. Fortissimo includes a simple * implementation of a Memcached caching layer (FortissimoMemcacheCache). * @code * <?php * Config::cache('memcache') * ->whichInvokes('FortissimoMemcacheCache') * ->withParam('servers') * ->whoseValueIs(array('example.com:11211', 'example.com:11212')) * ->withParam('persistent')
public function testLoggers() { $cfg = Config::logger('lumberjack')->whichInvokes('ImOkay')->getConfiguration(); $this->assertEquals('ImOkay', $cfg[Config::LOGGERS]['lumberjack']['class']); }
/** * Initialize complex static variables * @static */ public static function staticInit() { self::$logger = Logger::getLogger(__CLASS__); }