Skip to content

Commit f6453a8

Browse files
authored
Merge pull request #54 from RGustBardon/master
Test if the context array accepts closed resources
2 parents 3490ba5 + d6f3561 commit f6453a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Psr/Log/Test/LoggerInterfaceTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ public function testObjectCastToString()
101101

102102
public function testContextCanContainAnything()
103103
{
104+
$closed = fopen('php://memory', 'r');
105+
fclose($closed);
106+
104107
$context = array(
105108
'bool' => true,
106109
'null' => null,
@@ -110,6 +113,7 @@ public function testContextCanContainAnything()
110113
'nested' => array('with object' => new DummyTest),
111114
'object' => new \DateTime,
112115
'resource' => fopen('php://memory', 'r'),
116+
'closed' => $closed,
113117
);
114118

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

0 commit comments

Comments
 (0)