Skip to content

7.0.0

Compare
Choose a tag to compare
@rennokki rennokki released this 13 Nov 10:16
· 52 commits to master since this release
c93a441

Updated Rennokki\LaravelSnsEvents\Concerns\GeneratesSnsMessages trait

Instead of manually using ->json('POST', $yourWebhookUrl), you can now import the trait in your TestCase class and use the sendSnsMessage method.

The certificate used for testing is auto-generated with OpenSSL and is auto-injected.

$payload = $this->getNotificationPayload(['test' => 1, 'sns' => true]);

$this->sendSnsMessage('/webhook', $payload)->assertOk();
  • SSL certificate for testing now auto-initializes (you should remove the custom initializeSsl() method defined in your TestCase, if you have any)
  • Renamed $privateKey to $snsPrivateKey to avoid conflicts
  • Renamed $certificate to $snsCertificate to avoid conflicts
  • Renamed $validCertUrl to $snsValidCertUrl to avoid conflicts
  • For manual testing, either in local or testing, you can pass sns_certificate as query string or X-Sns-Testing-Certificate as header to inject your certificate for message signing testing