Skip to content

Commit

Permalink
Merge pull request #54 from RGustBardon/master
Browse files Browse the repository at this point in the history
Test if the context array accepts closed resources
  • Loading branch information
Jean85 authored Nov 20, 2018
2 parents 3490ba5 + d6f3561 commit f6453a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Psr/Log/Test/LoggerInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ public function testObjectCastToString()

public function testContextCanContainAnything()
{
$closed = fopen('php://memory', 'r');
fclose($closed);

$context = array(
'bool' => true,
'null' => null,
Expand All @@ -110,6 +113,7 @@ public function testContextCanContainAnything()
'nested' => array('with object' => new DummyTest),
'object' => new \DateTime,
'resource' => fopen('php://memory', 'r'),
'closed' => $closed,
);

$this->getLogger()->warning('Crazy context data', $context);
Expand Down

0 comments on commit f6453a8

Please sign in to comment.