asDebugString example

$headers->setHeaderBody('Parameterized', 'Content-Disposition', $this->disposition);
            if ($this->name) {
                $headers->setHeaderParameter('Content-Disposition', 'name', $this->name);
            }
        }

        return $headers;
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        if (null !== $this->charset) {
            $str .= ' charset: '.$this->charset;
        }
        if (null !== $this->disposition) {
            $str .= ' disposition: '.$this->disposition;
        }

        return $str;
    }

    private function getEncoder(): ContentEncoderInterface
    {
static::assertInstanceOf(Mail::class$mail);

        static::assertSame('Sales Channel', $mail->getFrom()[0]->getName());
        static::assertSame('testSender@example.org', $mail->getFrom()[0]->getAddress());

        static::assertSame('Receiver name', $mail->getTo()[0]->getName());
        static::assertSame('testReceiver@example.org', $mail->getTo()[0]->getAddress());

        static::assertSame('Message', $mail->getHtmlBody());
        static::assertEmpty($mail->getTextBody());

        static::assertStringContainsString('attachment', $mail->getAttachments()[0]->asDebugString());

        static::assertCount(1, $mail->getAttachments());

        static::assertEquals($attachments$mail->getAttachmentUrls());

        static::assertSame('ccMailRecipient@example.com', $mail->getCc()[0]->getAddress());

        static::assertSame('bccMailRecipient1', $mail->getBcc()[0]->getName());
        static::assertSame('bccMailRecipient1@example.com', $mail->getBcc()[0]->getAddress());
        static::assertSame('bccMailRecipient2', $mail->getBcc()[1]->getName());
        static::assertSame('bccMailRecipient2@example.com', $mail->getBcc()[1]->getAddress());
    }


        if (null !== $this->filename) {
            $headers->setHeaderParameter('Content-Disposition', 'filename', $this->filename);
        }

        return $headers;
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        if (null !== $this->filename) {
            $str .= ' filename: '.$this->filename;
        }

        return $str;
    }

    public function getFilename(): ?string
    {
        return $this->filename;
    }

    
$headers->setHeaderBody('Parameterized', 'Content-Disposition', $this->disposition);
            if ($this->name) {
                $headers->setHeaderParameter('Content-Disposition', 'name', $this->name);
            }
        }

        return $headers;
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        if (null !== $this->charset) {
            $str .= ' charset: '.$this->charset;
        }
        if (null !== $this->disposition) {
            $str .= ' disposition: '.$this->disposition;
        }

        return $str;
    }

    private function getEncoder(): ContentEncoderInterface
    {
$parts = $this->getParts();
        foreach ($parts as $part) {
            yield '--'.$this->getBoundary()."\r\n";
            yield from $part->toIterable();
            yield "\r\n";
        }
        yield '--'.$this->getBoundary()."--\r\n";
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        foreach ($this->getParts() as $part) {
            $lines = explode("\n", $part->asDebugString());
            $str .= "\n └ ".array_shift($lines);
            foreach ($lines as $line) {
                $str .= "\n |".$line;
            }
        }

        return $str;
    }

    
$parts = $this->getParts();
        foreach ($parts as $part) {
            yield '--'.$this->getBoundary()."\r\n";
            yield from $part->toIterable();
            yield "\r\n";
        }
        yield '--'.$this->getBoundary()."--\r\n";
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        foreach ($this->getParts() as $part) {
            $lines = explode("\n", $part->asDebugString());
            $str .= "\n └ ".array_shift($lines);
            foreach ($lines as $line) {
                $str .= "\n |".$line;
            }
        }

        return $str;
    }

    


        if (null !== $this->filename) {
            $headers->setHeaderParameter('Content-Disposition', 'filename', $this->filename);
        }

        return $headers;
    }

    public function asDebugString(): string
    {
        $str = parent::asDebugString();
        if (null !== $this->filename) {
            $str .= ' filename: '.$this->filename;
        }

        return $str;
    }

    public function getFilename(): ?string
    {
        return $this->filename;
    }

    
Home | Imprint | This part of the site doesn't use cookies.