예제 #1
0
 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Log::reset();
     if ($this->_restoreError) {
         restore_error_handler();
         restore_exception_handler();
     }
 }
예제 #2
0
파일: LogTest.php 프로젝트: Slayug/castor
 /**
  * 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);
 }
예제 #3
0
 public function tearDown()
 {
     parent::tearDown();
     Log::reset();
 }