Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PeeHaa committed Apr 25, 2018
1 parent e4a6220 commit 8802058
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/minimal-test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php declare(strict_types=1);

namespace PeeHaa\MailGrab\Examples;

use PHPMailer\PHPMailer\PHPMailer;

require_once __DIR__ . '/../vendor/autoload.php';

$mail = new PHPMailer();

$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 9025;
$mail->SMTPDebug = true;

$mail->setFrom('from@example.com', 'M. Sender');
$mail->addAddress('to.with.name@example.net', 'Joe User');
$mail->addAddress('to.without.name@example.com');
$mail->addReplyTo('reply.to@example.com', 'Reply Address');
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');

$mail->Subject = 'PHPMailer';
$mail->Body = 'This is the HTML body.';
$mail->AltBody = 'This is the plain text body.';

if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
2 changes: 2 additions & 0 deletions tests/Unit/Smtp/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public function testListenReturnsPromise()
$client = new Client(
$this->createMock(ServerSocket::class),
$this->createMock(Factory::class),
// phpcs:disable
function() {},
// phpcs:enable
$this->createMock(Output::class)
);

Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Smtp/ServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ public function testRunWithoutAddresses()
{
$server = new Server(
$this->createMock(Factory::class),
// phpcs:disable
function() {},
// phpcs:enable
$this->createMock(Output::class),
[],
9025
Expand Down

0 comments on commit 8802058

Please sign in to comment.