コード例 #1
0
ファイル: LogTest.php プロジェクト: CaptainSharf/SSAD_Project
 public function tearDown()
 {
     Log::unsetInstance();
     @unlink(self::getLogFileLocation());
     Log::$debugBacktraceForTests = null;
     parent::tearDown();
 }
コード例 #2
0
ファイル: LogTest.php プロジェクト: bossrabbit/piwik
 public function tearDown()
 {
     parent::tearDown();
     StaticContainer::clearContainer();
     Log::unsetInstance();
     @unlink(self::getLogFileLocation());
     Log::$debugBacktraceForTests = null;
 }
コード例 #3
0
 /**
  * @test
  */
 public function it_should_add_severity_for_errors()
 {
     $processor = new ExceptionToTextProcessor();
     Log::$debugBacktraceForTests = '[stack trace]';
     $exception = new \ErrorException('Hello world', 0, 1, 'file.php', 123);
     $record = array('context' => array('exception' => $exception));
     $result = $processor($record);
     $expected = array('message' => "file.php(123): Error - Hello world\n[stack trace]", 'context' => array('exception' => $exception));
     $this->assertEquals($expected, $result);
 }