DigestPart example

namespace Symfony\Component\Mime\Tests\Part\Multipart;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Mime\Message;
use Symfony\Component\Mime\Part\MessagePart;
use Symfony\Component\Mime\Part\Multipart\DigestPart;

class DigestPartTest extends TestCase
{
    public function testConstructor()
    {
        $r = new DigestPart($a = new MessagePart(new Message())$b = new MessagePart(new Message()));
        $this->assertEquals('multipart', $r->getMediaType());
        $this->assertEquals('digest', $r->getMediaSubtype());
        $this->assertEquals([$a$b]$r->getParts());
    }
}
Home | Imprint | This part of the site doesn't use cookies.