MailAttachmentsBuilder example

private Connection&MockObject $connection;

    private MailAttachmentsBuilder $attachmentsBuilder;

    protected function setUp(): void
    {
        $this->mediaService = $this->createMock(MediaService::class);
        $this->mediaRepository = $this->createMock(EntityRepository::class);
        $this->documentGenerator = $this->createMock(DocumentGenerator::class);
        $this->connection = $this->createMock(Connection::class);

        $this->attachmentsBuilder = new MailAttachmentsBuilder(
            $this->mediaService,
            $this->mediaRepository,
            $this->documentGenerator,
            $this->connection
        );
    }

    public function testBuildTemplateMediaAttachments(): void
    {
        $context = Context::createDefaultContext();
        $mailTemplate = new MailTemplateEntity();
        
Home | Imprint | This part of the site doesn't use cookies.