$this->
assertEquals(new Headers( new ParameterizedHeader('Content-Type', 'text/html',
['name' => 'photo.jpg'
]),
new UnstructuredHeader('Content-Transfer-Encoding', 'base64'
),
new ParameterizedHeader('Content-Disposition', 'inline',
['name' => 'photo.jpg', 'filename' => 'photo.jpg'
]) ),
$p->
getPreparedHeaders());
} public function testAsInlineWithCID() { $p =
new DataPart('content', 'photo.jpg', 'text/html'
);
$p->
asInline();
$cid =
$p->
getContentId();
$this->
assertEquals(new Headers( new ParameterizedHeader('Content-Type', 'text/html',
['name' => 'photo.jpg'
]),
new UnstructuredHeader('Content-Transfer-Encoding', 'base64'
),
new ParameterizedHeader('Content-Disposition', 'inline',
['name' => 'photo.jpg', 'filename' => 'photo.jpg'
]),
new IdentificationHeader('Content-ID',
$cid) ),
$p->
getPreparedHeaders());
} public function testFromPath() { $p = DataPart::
fromPath($file = __DIR__.'/../Fixtures/mimetypes/test.gif'
);