<?php/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespaceSymfony\Component\Mime\Tests;usePHPUnit\Framework\TestCase;useSymfony\Component\Mime\RawMessage;classRawMessageTestextendsTestCase{publicfunctiontestToString(){$message=newRawMessage('string');$this->assertEquals('string',$message->toString());$this->assertEquals('string',implode('',iterator_to_array($message->toIterable())));// calling methods more than once work$this->assertEquals('string',$message->toString());$this->assertEquals('string',implode('',iterator_to_array($message->toIterable())));$message=newRawMessage(new\ArrayObject(['some',' ','string']));$this->assertEquals('some string',$message->toString());$this->assertEquals('some string',implode('',iterator_to_array($message->toIterable())));// calling methods more than once work$this->assertEquals('some string',$message->toString());$this->assertEquals('some string',implode('',iterator_to_array($message->toIterable())));}}