$this->
assertEquals('png',
$p->
getMediaSubType());
$this->
assertEquals(new Headers( new ParameterizedHeader('Content-Type', 'image/png',
['name' => 'logo_symfony_header.png'
]),
new UnstructuredHeader('Content-Transfer-Encoding', 'base64'
),
new ParameterizedHeader('Content-Disposition', 'attachment',
['name' => 'logo_symfony_header.png', 'filename' => 'logo_symfony_header.png'
]) ),
$p->
getPreparedHeaders());
} public function testHasContentId() { $p =
new DataPart('content'
);
$this->
assertFalse($p->
hasContentId());
$p->
getContentId();
$this->
assertTrue($p->
hasContentId());
} public function testSetContentId() { $p =
new DataPart('content'
);
$p->
setContentId('test@test'
);
$this->
assertTrue($p->
hasContentId());
$this->
assertSame('test@test',
$p->
getContentId());
}