You are here

function Braintree_WebhookNotificationTest::testParsingUnknownPublicKeyRaisesError in Commerce Braintree 7

File

braintree_php/tests/unit/WebhookNotificationTest.php, line 44

Class

Braintree_WebhookNotificationTest

Code

function testParsingUnknownPublicKeyRaisesError() {
  $sampleNotification = Braintree_WebhookTesting::sampleNotification(Braintree_WebhookNotification::SUBSCRIPTION_WENT_PAST_DUE, 'my_id');
  $this
    ->setExpectedException('Braintree_Exception_InvalidSignature');
  $webhookNotification = Braintree_WebhookNotification::parse("bad" . $sampleNotification['signature'], $sampleNotification['payload']);
}