/** * @covers ContentAttachment::getContentType */ public function testGetContentType() { $contentType = "Notification content type"; $this->object->setContentType($contentType); $actual = $this->object->getContentType(); $this->assertSame($contentType, $actual); }
/** * Add an attachment. * * @param Blob $content the attachment content * @param String $contentType the content type * @param String $fileName a file name for this attachment. */ public function attachContent($content, $contentType, $fileName) { $attachment = new ContentAttachment(); $attachment->setContent($content); $attachment->setContentType($contentType); $attachment->setFileName($fileName); $this->attachments[] = $attachment; }