/** * tearDown * * @return void */ public function tearDown() { parent::tearDown(); Log::reset(); if ($this->_restoreError) { restore_error_handler(); restore_exception_handler(); } }
/** * testPassingScopeToEngine method */ public function testPassingScopeToEngine() { Configure::write('App.namespace', 'TestApp'); Log::reset(); Log::config('scope_test', ['engine' => 'TestApp', 'path' => LOGS, 'types' => ['notice', 'info', 'debug'], 'scopes' => ['foo', 'bar']]); $engine = Log::engine('scope_test'); $this->assertNull($engine->passedScope); Log::write('debug', 'test message', 'foo'); $this->assertEquals(['scope' => ['foo']], $engine->passedScope); Log::write('debug', 'test message', ['foo', 'bar']); $this->assertEquals(['scope' => ['foo', 'bar']], $engine->passedScope); $result = Log::write('debug', 'test message'); $this->assertFalse($result); }
public function tearDown() { parent::tearDown(); Log::reset(); }