8000 Mark reflection properties as accessible · symfony/symfony@79dd8bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 79dd8bb

Browse files
Mark reflection properties as accessible
1 parent 3c9a46d commit 79dd8bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Mailer/Tests/Transport/SendmailTransportTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function testThrowsTransportExceptionOnFailure()
9797
$sendmailTransport->send($mail, $envelope);
9898

9999
$streamProperty = new \ReflectionProperty(SendmailTransport::class, 'stream');
100+
$streamProperty->setAccessible(true);
100101
$stream = $streamProperty->getValue($sendmailTransport);
101102
$this->assertNull($stream->stream);
102103
}
@@ -114,8 +115,10 @@ public function testStreamIsClearedOnFailure()
114115
}
115116

116117
$streamProperty = new \ReflectionProperty(SendmailTransport::class, 'stream');
118+
$streamProperty->setAccessible(true);
117119
$stream = $streamProperty->getValue($sendmailTransport);
118120
$innerStreamProperty = new \ReflectionProperty(ProcessStream::class, 'stream');
121+
$innerStreamProperty->setAccessible(true);
119122
$this->assertNull($innerStreamProperty->getValue($stream));
120123
}
121124

@@ -127,6 +130,7 @@ public function testDoesNotThrowWhenInteractive()
127130

128131
$sendmailTransport = new SendmailTransport(self::FAKE_INTERACTIVE_SENDMAIL);
129132
$transportProperty = new \ReflectionProperty(SendmailTransport::class, 'transport');
133+
$transportProperty->setAccessible(true);
130134

131135
// Replace the transport with an anonymous consumer that trigger the stream methods
132136
$transportProperty->setValue($sendmailTransport, new class($transportProperty->getValue($sendmailTransport)->getStream()) implements TransportInterface {

0 commit comments

Comments
 (0)
0