assertTrue(true); fclose($stream); } public function testRequireResponseRejectsUnexpectedCode(): void { $stream = fopen('php://memory', 'r+'); fwrite($stream, "550 rejected\r\n"); rewind($stream); $this->expectException(RuntimeException::class); smtp_require_response($stream, 250); } public function testSmtpWriteRejectsClosedStream(): void { $stream = fopen('php://memory', 'r+'); fclose($stream); $this->expectException(RuntimeException::class); smtp_write($stream, "EHLO example.com\r\n"); } }