public function testRootView() { $message = $this->message->getMessage(); $this->assertArrayHasKey('subject', $message); $this->assertArrayHasKey('from', $message); $this->assertArrayHasKey('to', $message); $this->assertEquals(static::SUBJECT, $message['subject']); $this->assertEquals(static::FROM, $message['from'][0]); $to = $message['to']; $this->assertCount(2, $to); $this->assertEquals("'Recipient One' <*****@*****.**>", $message['to'][0]); $this->assertEquals("'Recipient Two' <*****@*****.**>", $message['to'][1]); }
public function send(MessageViewModel $message) { $domain = $this->options->getDomain(); return $this->mg->post("{$domain}/messages", $message->getMessage(), $message->getFiles()); }