/** * Returns the parts parsed for this multipart. * * @return ezcMailMultipartReport */ public function finishMultipart() { if (isset($this->parts[0])) { $this->report->setReadablePart($this->parts[0]); } if (isset($this->parts[1])) { $this->report->setMachinePart($this->parts[1]); } if (isset($this->parts[2])) { $this->report->setOriginalPart($this->parts[2]); } $size = 0; foreach ($this->report->getParts() as $part) { $size += $part->size; } $this->report->size = $size; return $this->report; }
public function testMultipartReportEmpty() { $report = new ezcMailMultipartReport(); $this->assertEquals(null, $report->getReadablePart()); $this->assertEquals(null, $report->getMachinePart()); $this->assertEquals(null, $report->getOriginalPart()); }