for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Da\Mailer\Test\Fixture;
use Da\Mailer\Queue\Backend\Pdo\PdoMailJob;
use Da\Mailer\Queue\Backend\Sqs\SqsMailJob;
use Da\Mailer\Model\MailMessage;
use Da\Mailer\Transport\TransportInterface;
class FixtureHelper
{
public static function getMailMessage()
return new MailMessage(self::getMailMessageSmtpConfigurationArray());
}
public static function getPdoMailJob()
return new PdoMailJob([
'message' => json_encode(self::getMailMessage())
]);
public static function getSqsMailJob()
return new SqsMailJob([
public static function getMySqlConnectionConfiguration()
return [
'connectionString' => 'mysql:host=localhost;dbname=mail_queue_test',
'username' => 'root',
'password' => '',
];
public static function getMailMessageSmtpConfigurationArray()
'transportOptions' => [],
'transportType' => TransportInterface::TYPE_SMTP,
'host' => '127.0.0.1',
'port' => 21,
'from' => '[email protected]',
'to' => '[email protected]',
'cc' => '[email protected]',
'bcc' => '[email protected]',
'subject' => 'subject',
'bodyHtml' => '<b>This is body Html</b>',
'bodyText' => 'This is body text',
'attachments' => [ __DIR__ . '/../data/test_view.php']