/**
  * Returns the parts parsed for this multipart.
  *
  * @return ezcMailMultipartRelated
  */
 public function finishMultipart()
 {
     $size = 0;
     if ($this->part->getMainPart()) {
         $size = $this->part->getMainPart()->size;
     }
     foreach ($this->part->getRelatedParts() as $part) {
         $size += $part->size;
     }
     $this->part->size = $size;
     return $this->part;
 }
Beispiel #2
0
 public function testGetMultipartRelatedWithoutMain()
 {
     $part = new ezcMailMultipartRelated();
     $part->addRelatedPart(new ezcMailText('a'));
     $this->assertEquals(1, count($part->getRelatedParts()));
 }