public function test_that_it_can_set_and_get_cc_address() { $ccAddress = '*****@*****.**'; $ccName = 'CC'; $this->message->addCc($ccAddress, $ccName); $cc = $this->message->getCc(); $this->assertTrue($ccAddress === $cc[0]['address'] && $ccName === $cc[0]['name']); }
/** * Sets the CC addresses * * @param Message $message The mail message * @param Swift_Message $swiftMessage The Swift Mailer message * * @return void */ protected function setCc(Message $message, Swift_Message $swiftMessage) { foreach ($message->getCc() as $cc) { $swiftMessage->addCc($cc['address'], $cc['name']); } }