public function testToWebFormatWithHeaders() { $email = new Email(); $email->addHeader('X-Sent-Using', 'SendGrid-API'); $json = $email->toWebFormat(); $headers = json_decode($json['headers'], TRUE); $this->assertEquals('SendGrid-API', $headers['X-Sent-Using']); }