This commit is contained in:
2026-02-02 15:18:51 +01:00
parent 7a26dd69a5
commit ae0ee002ec
170 changed files with 7446 additions and 1519 deletions

View File

@@ -13,6 +13,7 @@ class NotificationTest extends TestCase
* @param $payload
* @param $headers
* @throws SignatureVerificationException
* @suppress PhanNoopNew
*/
public function testVerifyPayloadSuccessfully($payload, $headers)
{
@@ -40,6 +41,11 @@ class NotificationTest extends TestCase
];
}
/**
* @return void
* @throws SignatureVerificationException
* @suppress PhanNoopNew
*/
public function testShouldThrowExceptionOnIncorrectSignature()
{
// given
@@ -53,12 +59,14 @@ class NotificationTest extends TestCase
// then
}
/**
* @suppress PhanNoopNew
* @return void
*/
public function testShouldThrowExceptionOnMissingPayload()
{
// given
$this->expectException(InvalidArgumentException::class);
$payload = null;
$headers = [];
// when
new Notification('s3ecret-k3y', null, null);
@@ -66,12 +74,16 @@ class NotificationTest extends TestCase
// then
}
/**
* @return void
* @throws SignatureVerificationException
* @suppress PhanNoopNew
*/
public function testShouldThrowExceptionOnMissingPayloadHeaders()
{
// given
$this->expectException(InvalidArgumentException::class);
$payload = $this->loadData('notification.json', true);
$headers = null;
// when
new Notification('s3ecret-k3y', $payload, null);