/** * Test Log adapter methods if no logger set * * Pre-conditions * Log instantiated without associated Logger * * Post-conditions: * All Log adapter methods return false */ public function testLoggerMethodsIfNoLogger() { $log = new Slim_Log(); $this->assertFalse($log->debug('Test')); $this->assertFalse($log->info('Test')); $this->assertFalse($log->warn('Test')); $this->assertFalse($log->error('Test')); $this->assertFalse($log->fatal('Test')); }
public function testLogDebugExcludedByLevel() { $log = new Slim_Log(new MyWriter()); $log->setLevel(3); $this->assertFalse($log->debug('Debug')); }
/** * Test Log adapter methods if no logger set * * Pre-conditions * Logger not set * * Post-conditions: * All calls to adapter return false */ public function testLoggerMethodsIfNoLogger() { Slim_Log::setLogger(null); $this->assertFalse(Slim_Log::debug('Test')); $this->assertFalse(Slim_Log::info('Test')); $this->assertFalse(Slim_Log::warn('Test')); $this->assertFalse(Slim_Log::error('Test')); $this->assertFalse(Slim_Log::fatal('Test')); }