mirror of
https://github.com/friendica/friendica
synced 2025-05-01 19:04:23 +02:00
Merge branch '2021.03-rc' into copyright-2021
This commit is contained in:
commit
befc2af504
22 changed files with 41829 additions and 40547 deletions
|
@ -159,4 +159,23 @@ abstract class AbstractLoggerTest extends MockedTest
|
|||
|
||||
self::assertContains(@json_encode($context), $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a message with an exception
|
||||
*/
|
||||
public function testExceptionHandling()
|
||||
{
|
||||
$e = new \Exception("Test String", 123);
|
||||
$eFollowUp = new \Exception("FollowUp", 456, $e);
|
||||
|
||||
$assertion = $eFollowUp->__toString();
|
||||
|
||||
$logger = $this->getInstance();
|
||||
$logger->alert('test', ['e' => $eFollowUp]);
|
||||
$text = $this->getContent();
|
||||
|
||||
self::assertLogline($text);
|
||||
|
||||
self::assertContains(@json_encode($assertion), $this->getContent());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue