public function tearDown() { Log::unsetInstance(); @unlink(self::getLogFileLocation()); Log::$debugBacktraceForTests = null; parent::tearDown(); }
public function tearDown() { parent::tearDown(); StaticContainer::clearContainer(); Log::unsetInstance(); @unlink(self::getLogFileLocation()); Log::$debugBacktraceForTests = null; }
/** * @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); }