NSWDPC\Messaging\Mailgun\Tests\MailgunSyncTest
Tests for mailgun-sync, see README.md for more
- Author: James Ellis <james.ellis@dpc.nsw.gov.au>
Synopsis
class MailgunSyncTest
extends SapphireTest
{
- // members
- protected boolean $usesDatabase = false;
- protected string $test_api_key = 'the_api_key';
- protected string $test_api_domain = 'testing.example.net';
- private static string $to_address = "test@example.com";
- private static string $to_name = "Test Tester";
- private static string $cc_address = "";
- private static string $from_address = "from@example.com";
- private static string $from_name = "From Tester";
- private static object $test_body = "<h1>Header provider strategic</h1>" . "<p>consulting support conversation advertisements policy promotional request.</p>" . "<p>Option purpose programming</p>;
- // methods
- public void setUp()
- public void testApiDomain()
- public void testApiEndpoint()
- public void testMailerDelivery()
- public void testJobMailerDelivery()
- public void testAlwaysFrom()
- public void testAPIDelivery()
- public void testSendWithDefaultConfiguration()
- public void testAttachmentDelivery()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Uses
- SilverStripe\Core\Config\Configurable
Members
private
- $cc_address
- $from_address
- $from_name
- $test_body
- $to_address
- $to_name
protected
- $test_api_domain
- $test_api_key
- $usesDatabase
Methods
public
- setUp()
- testAPIDelivery() — test API delivery only
- testAlwaysFrom() — Test always from setting
- testApiDomain() — Test that the API domain configured is maintained
- testApiEndpoint() — Test that the API endpoint configured is maintained
- testAttachmentDelivery() — test a message with attachments
- testJobMailerDelivery() — Test delivery via a Job
- testMailerDelivery() — test mailer delivery only, no sync or event checking, just that we get the expected response
- testSendWithDefaultConfiguration() — Test sending with default values set