/**
  * Adds the part $part to the list of multipart messages.
  *
  * This method is called automatically by ezcMailMultipartParser
  * each time a part is parsed.
  *
  * @param ezcMailPart $part
  */
 public function partDone(ezcMailPart $part)
 {
     $this->part->appendPart($part);
 }
Example #2
0
 public function testGetParts()
 {
     $part = new ezcMailMultipartMixed();
     $part->appendPart(new ezcMailText('a'));
     $this->assertEquals(1, count($part->getParts()));
     $part = new ezcMailMultipartAlternative();
     $part->appendPart(new ezcMailText('a'));
     $this->assertEquals(1, count($part->getParts()));
     $part = new ezcMailMultipartRelated();
     $part->setMainPart($main = new ezcMailText('a'));
     $this->assertEquals($main, $part->getMainPart());
     $part->addRelatedPart(new ezcMailText('a'));
     $part->addRelatedPart(new ezcMailText('a'));
     $this->assertEquals(2, count($part->getRelatedParts()));
 }