public function testMTEmailFrom() { $email = new MailTrapEmailAdapter(); $email->from('a@b.c', 'abc'); $reflection = new \ReflectionClass($email); $mailProp = $reflection->getProperty('from'); $mailProp->setAccessible(true); $this->assertEquals(['email' => 'a@b.c', 'name' => 'abc'], $mailProp->getValue($email)); }
protected function createMessage() { $message = new MailTrapEmailAdapter(); // If a global from address has been specified we will set it on every message // instances so the developer does not have to repeat themselves every time // they create a new message. We will just go ahead and push the address. if (isset($this->from['address'])) { $message->from($this->from['address'], $this->from['name']); } return $message; }