mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 19:14:27 +02:00
Fix object handling inside log arrays
This commit is contained in:
parent
cefeb02517
commit
b61b3cb182
4 changed files with 45 additions and 4 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