@@ -94,8 +94,8 @@ public function testThrowsTransportExceptionOnFailure()
94
94
$ sendmailTransport ->send ($ mail , $ envelope );
95
95
96
96
$ streamProperty = new \ReflectionProperty (SendmailTransport::class, 'stream ' );
97
- $ streamProperty ->setAccessible (true );
98
97
$ stream = $ streamProperty ->getValue ($ sendmailTransport );
98
+
99
99
$ this ->assertNull ($ stream ->stream );
100
100
}
101
101
@@ -112,10 +112,9 @@ public function testStreamIsClearedOnFailure()
112
112
}
113
113
114
114
$ streamProperty = new \ReflectionProperty (SendmailTransport::class, 'stream ' );
115
- $ streamProperty ->setAccessible (true );
116
115
$ stream = $ streamProperty ->getValue ($ sendmailTransport );
117
116
$ innerStreamProperty = new \ReflectionProperty (ProcessStream::class, 'stream ' );
118
- $ innerStreamProperty -> setAccessible ( true );
117
+
119
118
$ this ->assertNull ($ innerStreamProperty ->getValue ($ stream ));
120
119
}
121
120
@@ -127,7 +126,6 @@ public function testDoesNotThrowWhenInteractive()
127
126
128
127
$ sendmailTransport = new SendmailTransport (self ::FAKE_INTERACTIVE_SENDMAIL );
129
128
$ transportProperty = new \ReflectionProperty (SendmailTransport::class, 'transport ' );
130
- $ transportProperty ->setAccessible (true );
131
129
132
130
// Replace the transport with an anonymous consumer that trigger the stream methods
133
131
$ transportProperty ->setValue ($ sendmailTransport , new class ($ transportProperty ->getValue ($ sendmailTransport )->getStream ()) extends SmtpTransport {
0 commit comments