--TEST-- message to stream --SKIPIF-- --FILE-- addHeader("Content-Type", "text/plain"); $m->getBody()->append("this\nis\nthe\ntext"); $f = tmpfile(); $m->toStream($f); rewind($f); var_dump((string) $m === stream_get_contents($f)); fclose($f); ?> Done --EXPECT-- Test bool(true) Done