Skip to content

Commit

Permalink
style ci
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Jun 2, 2022
1 parent 861ea14 commit 2201661
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
2 changes: 0 additions & 2 deletions src/Illuminate/Mail/Mailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,13 @@ class Mailable implements MailableContract, Renderable
*/
public $embeds = [];


/**
* The raw embedded attachments for the message.
*
* @var array
*/
public $rawEmbeds = [];


/**
* The tags for the message.
*
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Notifications/Messages/MailMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class MailMessage extends SimpleMessage implements Renderable
*/
public $embeds = [];


/**
* The raw embedded attachments for the message.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/Mail/MailMailableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public function toMailAttachment()
}
});

$this->assertSame(__DIR__.'/foo.jpg' , $mailable->embeds[0]);
$this->assertSame(__DIR__.'/foo.jpg', $mailable->embeds[0]);
}
}

Expand Down
20 changes: 10 additions & 10 deletions tests/Mail/MailMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public function testBasicAttachment()
$attachment = $this->message->getSymfonyMessage()->getAttachments()[0];
$headers = $attachment->getPreparedHeaders()->toArray();
$this->assertSame('expected attachment body', $attachment->getBody());
$this->assertSame("Content-Type: image/png; name=bar.jpg", $headers[0]);
$this->assertSame('Content-Type: image/png; name=bar.jpg', $headers[0]);
$this->assertSame('Content-Transfer-Encoding: base64', $headers[1]);
$this->assertSame("Content-Disposition: attachment; name=bar.jpg; filename=bar.jpg", $headers[2]);
$this->assertSame('Content-Disposition: attachment; name=bar.jpg; filename=bar.jpg', $headers[2]);

unlink($path);
}
Expand All @@ -110,9 +110,9 @@ public function testDataAttachment()
$attachment = $this->message->getSymfonyMessage()->getAttachments()[0];
$headers = $attachment->getPreparedHeaders()->toArray();
$this->assertSame('expected attachment body', $attachment->getBody());
$this->assertSame("Content-Type: image/png; name=foo.jpg", $headers[0]);
$this->assertSame('Content-Type: image/png; name=foo.jpg', $headers[0]);
$this->assertSame('Content-Transfer-Encoding: base64', $headers[1]);
$this->assertSame("Content-Disposition: attachment; name=foo.jpg; filename=foo.jpg", $headers[2]);
$this->assertSame('Content-Disposition: attachment; name=foo.jpg; filename=foo.jpg', $headers[2]);
}

public function testItAttachesFilesViaAttachableContractFromPath()
Expand All @@ -132,9 +132,9 @@ public function toMailAttachment()
$attachment = $this->message->getSymfonyMessage()->getAttachments()[0];
$headers = $attachment->getPreparedHeaders()->toArray();
$this->assertSame('expected attachment body', $attachment->getBody());
$this->assertSame("Content-Type: image/png; name=bar.jpg", $headers[0]);
$this->assertSame('Content-Type: image/png; name=bar.jpg', $headers[0]);
$this->assertSame('Content-Transfer-Encoding: base64', $headers[1]);
$this->assertSame("Content-Disposition: attachment; name=bar.jpg; filename=bar.jpg", $headers[2]);
$this->assertSame('Content-Disposition: attachment; name=bar.jpg; filename=bar.jpg', $headers[2]);

unlink($path);
}
Expand All @@ -153,9 +153,9 @@ public function toMailAttachment()
$attachment = $this->message->getSymfonyMessage()->getAttachments()[0];
$headers = $attachment->getPreparedHeaders()->toArray();
$this->assertSame('expected attachment body', $attachment->getBody());
$this->assertSame("Content-Type: image/png; name=foo.jpg", $headers[0]);
$this->assertSame('Content-Type: image/png; name=foo.jpg', $headers[0]);
$this->assertSame('Content-Transfer-Encoding: base64', $headers[1]);
$this->assertSame("Content-Disposition: attachment; name=foo.jpg; filename=foo.jpg", $headers[2]);
$this->assertSame('Content-Disposition: attachment; name=foo.jpg; filename=foo.jpg', $headers[2]);
}

public function testBasicEmbed()
Expand All @@ -182,9 +182,9 @@ public function testDataEmbed()
$attachment = $this->message->getSymfonyMessage()->getAttachments()[0];
$headers = $attachment->getPreparedHeaders()->toArray();
$this->assertSame('expected attachment body', $attachment->getBody());
$this->assertSame("Content-Type: image/png; name=foo.jpg", $headers[0]);
$this->assertSame('Content-Type: image/png; name=foo.jpg', $headers[0]);
$this->assertSame('Content-Transfer-Encoding: base64', $headers[1]);
$this->assertSame("Content-Disposition: inline; name=foo.jpg; filename=foo.jpg", $headers[2]);
$this->assertSame('Content-Disposition: inline; name=foo.jpg; filename=foo.jpg', $headers[2]);
}

public function testItEmbedsFilesViaAttachableContractFromPath()
Expand Down
2 changes: 1 addition & 1 deletion tests/Notifications/NotificationMailMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,6 @@ public function toMailAttachment()
}
});

$this->assertSame(__DIR__.'/foo.jpg' , $mailMessage->embeds[0]);
$this->assertSame(__DIR__.'/foo.jpg', $mailMessage->embeds[0]);
}
}

0 comments on commit 2201661

Please sign in to comment.