forked from LiveCarta/PayPal-PHP-SDK
Add test for verifyWebhookSignature
This commit is contained in:
@@ -77,6 +77,15 @@ class VerifyWebhookSignatureTest extends \PHPUnit_Framework_TestCase
|
|||||||
$obj = new VerifyWebhookSignature();
|
$obj = new VerifyWebhookSignature();
|
||||||
$obj->setCertUrl(null);
|
$obj->setCertUrl(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testToJsonToIncludeRequestBodyAsWebhookEvent() {
|
||||||
|
$obj = new VerifyWebhookSignature();
|
||||||
|
$requestBody = '{"id":"123", "links": [], "something": {}}';
|
||||||
|
$obj->setRequestBody($requestBody);
|
||||||
|
|
||||||
|
$this->assertEquals($obj->toJSON(), '{"webhook_event": ' . $requestBody .'}');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider mockProvider
|
* @dataProvider mockProvider
|
||||||
* @param VerifyWebhookSignature $obj
|
* @param VerifyWebhookSignature $obj
|
||||||
|
|||||||
Reference in New Issue
Block a user