Laravel AWS SNS Events
7.x
7.x
  • โšกIntroduction
  • ๐ŸŽ‰Support
  • Getting Started
    • โฌ†๏ธUpgrading from 6.x
    • ๐Ÿš€Installation
    • ๐Ÿ“กConfiguring Events
    • ๐ŸงชTesting your implementation
  • Customization
    • ๐Ÿ“ฆCustom Payload
    • ๐ŸคฟCustom Event Classes
    • ๐Ÿ”—Custom Method Hooks
  • AWS Webhooks
    • โšกIntroduction
    • ๐Ÿš€Installation
    • ๐Ÿ™ŒShowcase
    • ๐Ÿ–ฅ๏ธSupported AWS Services
      • ๐ŸšจCloudWatch Alerts
      • ๐Ÿ“งSimple Email Service (SES)
      • ๐ŸŒ‰EventBridge Events
    • ๐ŸงชTesting your implementation
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started

Testing your implementation

Laravel SNS Events comes with a GeneratesSnsMessages trait that helps you create valid SES payloads in order to test your SNS implementation.


use Rennokki\LaravelSnsEvents\Concerns\GeneratesSnsMessages;

class MySesControllerTest extends TestCase
{
    use GeneratesSnsMessages;

    public function test_my_ses_controller()
    {
        $payload = $this->getNotificationPayload([
            'eventType' => $type,
        ]);

        $response = $this->sendSnsMessage('/webhook', $payload);

        $response->assertOk();
    }
}

Note: Please make sure to specify the certificate query parameter to the route when calling HTTP requests.

PreviousConfiguring EventsNextCustom Payload

Last updated 3 years ago

Was this helpful?

๐Ÿงช