Esempio n. 1
0
 public function testAttachmentGetterAndSetter()
 {
     $attachment = $this->getMock('Oro\\Bundle\\EmailBundle\\Entity\\EmailAttachment');
     $entity = new EmailBody();
     $entity->addAttachment($attachment);
     $attachments = $entity->getAttachments();
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $attachments);
     $this->assertCount(1, $attachments);
     $this->assertTrue($attachment === $attachments[0]);
 }