$p =
new DataPart('content', 'photo.jpg', 'text/html'
);
$this->
assertEquals(new Headers( new ParameterizedHeader('Content-Type', 'text/html',
['name' => 'photo.jpg'
]),
new UnstructuredHeader('Content-Transfer-Encoding', 'base64'
),
new ParameterizedHeader('Content-Disposition', 'attachment',
['name' => 'photo.jpg', 'filename' => 'photo.jpg'
]) ),
$p->
getPreparedHeaders());
} public function testAsInline() { $p =
new DataPart('content', 'photo.jpg', 'text/html'
);
$p->
asInline();
$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();