Fix attachment and inline image renaming (#571)

* Fix file renaming

* Fix file renaming
This commit is contained in:
Louis Coulet 2019-04-09 19:12:50 +02:00 committed by Tobias Nyholm
parent 2162ade61a
commit 7705cb7666
2 changed files with 10 additions and 10 deletions

View File

@ -270,7 +270,7 @@ class MessageBuilder
$this->message['attachment'][] = [ $this->message['attachment'][] = [
'filePath' => $attachmentPath, 'filePath' => $attachmentPath,
'remoteName' => $attachmentName, 'filename' => $attachmentName,
]; ];
return $this; return $this;
@ -284,7 +284,7 @@ class MessageBuilder
$this->message['inline'][] = [ $this->message['inline'][] = [
'filePath' => $inlineImagePath, 'filePath' => $inlineImagePath,
'remoteName' => $inlineImageName, 'filename' => $inlineImageName,
]; ];
return $this; return $this;

View File

@ -150,11 +150,11 @@ class MessageBuilderTest extends MailgunTestCase
[ [
[ [
'filePath' => '@../TestAssets/mailgun_icon.png', 'filePath' => '@../TestAssets/mailgun_icon.png',
'remoteName' => null, 'filename' => null,
], ],
[ [
'filePath' => '@../TestAssets/rackspace_logo.png', 'filePath' => '@../TestAssets/rackspace_logo.png',
'remoteName' => null, 'filename' => null,
], ],
], ],
$message['attachment'] $message['attachment']
@ -170,11 +170,11 @@ class MessageBuilderTest extends MailgunTestCase
[ [
[ [
'filePath' => '@../TestAssets/mailgun_icon.png', 'filePath' => '@../TestAssets/mailgun_icon.png',
'remoteName' => null, 'filename' => null,
], ],
[ [
'filePath' => '@../TestAssets/rackspace_logo.png', 'filePath' => '@../TestAssets/rackspace_logo.png',
'remoteName' => null, 'filename' => null,
], ],
], ],
$message['inline'] $message['inline']
@ -190,11 +190,11 @@ class MessageBuilderTest extends MailgunTestCase
[ [
[ [
'filePath' => '@../TestAssets/mailgun_icon.png', 'filePath' => '@../TestAssets/mailgun_icon.png',
'remoteName' => 'mg_icon.png', 'filename' => 'mg_icon.png',
], ],
[ [
'filePath' => '@../TestAssets/rackspace_logo.png', 'filePath' => '@../TestAssets/rackspace_logo.png',
'remoteName' => 'rs_logo.png', 'filename' => 'rs_logo.png',
], ],
], ],
$message['attachment'] $message['attachment']
@ -210,11 +210,11 @@ class MessageBuilderTest extends MailgunTestCase
[ [
[ [
'filePath' => '@../TestAssets/mailgun_icon.png', 'filePath' => '@../TestAssets/mailgun_icon.png',
'remoteName' => 'mg_icon.png', 'filename' => 'mg_icon.png',
], ],
[ [
'filePath' => '@../TestAssets/rackspace_logo.png', 'filePath' => '@../TestAssets/rackspace_logo.png',
'remoteName' => 'rs_logo.png', 'filename' => 'rs_logo.png',
], ],
], ],
$message['inline'] $message['inline']